diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2013-02-17 12:26:51 +0100 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2013-02-17 12:26:51 +0100 |
commit | bcf99d599862d8a7a6741b5f805c593fe7bf4ae0 (patch) | |
tree | 480716fcb2a7101688aa7bb1da94b634a480857f | |
parent | 3ab6706993a50b7c65b9007ead7d13a9ce3010e6 (diff) |
SASL sends AUTHFAIL on unsupported mechanisms, fixes bug #1482
-rw-r--r-- | modules/protocol/inspircd20.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/unreal.cpp | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 32e1a76c1..c30923548 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -568,7 +568,12 @@ struct IRCDMessageEncap : IRCDMessage base64(account\0account\0pass) */ if (params[4] == "S") - UplinkSocket::Message(Me) << "ENCAP " << params[2].substr(0, 3) << " SASL " << Me->GetSID() << " " << params[2] << " C +"; + { + if (params[5] == "PLAIN") + UplinkSocket::Message(Me) << "ENCAP " << params[2].substr(0, 3) << " SASL " << Me->GetSID() << " " << params[2] << " C +"; + else + UplinkSocket::Message(Me) << "ENCAP " << params[2].substr(0, 3) << " SASL " << Me->GetSID() << " " << params[2] << " C F"; + } else if (params[4] == "C") { Anope::string decoded; diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 2f5e75747..8449b7a19 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -893,7 +893,12 @@ struct IRCDMessageSASL : IRCDMessage return; if (params[2] == "S") - UplinkSocket::Message() << "SASL " << params[1].substr(0, p) << " " << params[1] << " C +"; + { + if (params[3] == "PLAIN") + UplinkSocket::Message() << "SASL " << params[1].substr(0, p) << " " << params[1] << " C +"; + else + UplinkSocket::Message() << "SASL " << params[1].substr(0, p) << " " << params[1] << " C F"; + } else if (params[2] == "C") { Anope::string decoded; |