diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-21 20:24:15 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-21 20:24:15 +0000 |
commit | c798703113cd96b8925d666f2831d420ee8176d2 (patch) | |
tree | 91cbbc1bdbc69e99578301973f8f1f3659b28e31 /src/modules/m_sasl.cpp | |
parent | cd8d817ac45a6a3db9faa20892b8a03f10caad1d (diff) |
If the user hasnt sent CAP REQ sasl, do nothing if AUTHENTICATE is sent by that user
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9154 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r-- | src/modules/m_sasl.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index fda574fb2..0bbe76838 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -30,17 +30,21 @@ class CommandAuthenticate : public Command { if (user->registered != REG_ALL) { - /* Only allow AUTHENTICATE on unregistered clients */ - std::deque<std::string> params; - params.push_back("*"); - params.push_back("AUTHENTICATE"); - params.push_back(user->uuid); + /* Only act if theyve enabled CAP REQ sasl */ + if (user->GetExt("sasl")) + { + /* Only allow AUTHENTICATE on unregistered clients */ + std::deque<std::string> params; + params.push_back("*"); + params.push_back("AUTHENTICATE"); + params.push_back(user->uuid); - for (int i = 0; i < pcnt; ++i) - params.push_back(parameters[i]); + for (int i = 0; i < pcnt; ++i) + params.push_back(parameters[i]); - Event e((char*)¶ms, Creator, "send_encap"); - e.Send(ServerInstance); + Event e((char*)¶ms, Creator, "send_encap"); + e.Send(ServerInstance); + } } return CMD_FAILURE; } |