mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Don't crash when receiving SASL lines from server without having negotiated SASL via CAP
Reported by Noisytoot on Pissnet, thanks
This commit is contained in:
@@ -196,6 +196,7 @@ class CSASLMod : public CModule {
|
||||
}
|
||||
|
||||
void Authenticate(const CString& sLine) {
|
||||
if (m_Mechanisms.empty()) return;
|
||||
/* Send blank authenticate for other mechanisms (like EXTERNAL). */
|
||||
CString sAuthLine;
|
||||
if (m_Mechanisms.GetCurrent().Equals("PLAIN") && sLine.Equals("+")) {
|
||||
@@ -249,6 +250,7 @@ class CSASLMod : public CModule {
|
||||
}
|
||||
|
||||
EModRet OnNumericMessage(CNumericMessage& msg) override {
|
||||
if (m_Mechanisms.empty()) return CONTINUE;
|
||||
if (msg.GetCode() == 903) {
|
||||
/* SASL success! */
|
||||
if (m_bVerbose) {
|
||||
|
||||
Reference in New Issue
Block a user