From 4b8e69882e8b591102bfb03da1425b04c43272de Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 1 Mar 2024 15:40:07 +0000 Subject: Add an option for opting-out of aborting incomplete authentication. This goes against the expectations of the spec which can break some clients but also not doing this can break others. Blah. --- src/modules/m_sasl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 61f529643..258c2f92e 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -409,6 +409,7 @@ private: CommandAuthenticate auth; CommandSASL sasl; ClientProtocol::EventProvider protoev; + bool abortonconnect; public: ModuleSASL() @@ -437,6 +438,7 @@ public: if (target.empty()) throw ModuleException(this, " must be set to the name of your services server!"); + abortonconnect = tag->getBool("abortonconnect", true); cap.requiressl = tag->getBool("requiressl"); sasl_target = target; servertracker.Reset(); @@ -449,7 +451,7 @@ public: // in progress, the server SHOULD abort it and send a 906 numeric, then // register the client without authentication. SaslAuthenticator* saslauth = authExt.Get(user); - if (saslauth) + if (abortonconnect && saslauth) { saslauth->Abort(); saslauth->AnnounceState(); -- cgit v1.3.1-10-gc9f91