summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-18 02:52:22 +0000
committerdz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-18 02:52:22 +0000
commitc381d405f9660235a45a63ea4b88795e37384524 (patch)
tree0ad3706dd0bfa1dd733235e354266d28ae6ba3ed /src
parente20cfc75066acde4f892e7061bc953e8380c6979 (diff)
Properly disconnect clients that send STARTTLS after registering; noticed by jdhore
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10897 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 702c09d31..f96afc606 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -71,7 +71,11 @@ class CommandStartTLS : public Command
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
- if (user->registered == REG_ALL)
+ /* changed from == REG_ALL to catch clients sending STARTTLS
+ * after NICK and USER but before OnUserConnect completes and
+ * give a proper error message (see bug #645) - dz
+ */
+ if (user->registered != REG_NONE)
{
ServerInstance->Users->QuitUser(user, "STARTTLS not allowed after client registration");
}