diff options
| author | 2024-03-01 15:40:07 +0000 | |
|---|---|---|
| committer | 2024-03-01 15:40:07 +0000 | |
| commit | 4b8e69882e8b591102bfb03da1425b04c43272de (patch) | |
| tree | 577d22f1f3a7eceb367d89f6e0ca5d9c0837a474 /src/modules/m_sasl.cpp | |
| parent | Release v4.0.0 alpha 25. (diff) | |
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.
Diffstat (limited to 'src/modules/m_sasl.cpp')
| -rw-r--r-- | src/modules/m_sasl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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, "<sasl:target> 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(); |
