From 407b2e004cf66e442771ec5d2bbe700dee1f3760 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 11 Oct 2017 00:15:14 +0100 Subject: Don't abort the SASL authentication in OnUserConnect. SASL-3.2 allows SASL auth to happen post-registration so this is no longer correct. --- src/modules/m_sasl.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index f1c467204..6e28a91aa 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -245,12 +245,6 @@ class SaslAuthenticator return this->state; } - void Abort(void) - { - this->state = SASL_DONE; - this->result = SASL_ABORT; - } - bool SendClientMessage(const std::vector& parameters) { if (this->state != SASL_COMM) @@ -267,7 +261,8 @@ class SaslAuthenticator if (parameters[0].c_str()[0] == '*') { - this->Abort(); + this->state = SASL_DONE; + this->result = SASL_ABORT; return false; } @@ -404,16 +399,6 @@ class ModuleSASL : public Module servertracker.Reset(); } - void OnUserConnect(LocalUser *user) CXX11_OVERRIDE - { - SaslAuthenticator *sasl_ = authExt.get(user); - if (sasl_) - { - sasl_->Abort(); - authExt.unset(user); - } - } - void OnDecodeMetaData(Extensible* target, const std::string& extname, const std::string& extdata) CXX11_OVERRIDE { if ((target == NULL) && (extname == "saslmechlist")) -- cgit v1.2.3