From c381d405f9660235a45a63ea4b88795e37384524 Mon Sep 17 00:00:00 2001 From: dz Date: Thu, 18 Dec 2008 02:52:22 +0000 Subject: 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 --- src/modules/extra/m_ssl_gnutls.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 ¶meters, 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"); } -- cgit v1.2.3