summaryrefslogtreecommitdiff
path: root/src/modules/m_sasl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r--src/modules/m_sasl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 0fb277b23..28bce2bf3 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -104,16 +104,15 @@ class SASLCap : public Cap::Capability
bool OnRequest(LocalUser* user, bool adding) CXX11_OVERRIDE
{
- // Requesting this cap is allowed anytime
- if (adding)
- return true;
-
- // But removing it can only be done when unregistered
- return (user->registered != REG_ALL);
+ // Servers MUST NAK any sasl capability request if the authentication layer
+ // is unavailable.
+ return servertracker.IsOnline();
}
bool OnList(LocalUser* user) CXX11_OVERRIDE
{
+ // Servers MUST NOT advertise the sasl capability if the authentication layer
+ // is unavailable.
return servertracker.IsOnline();
}