irclib: Abort authentication when server fails SCRAM challenge

Will be tested by irctest:
https://github.com/progval/irctest/pull/179
This commit is contained in:
Valentin Lorentz 2022-10-28 15:00:58 +02:00
parent e9a29e9159
commit 77805ff36e

View File

@ -2010,6 +2010,8 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
except scram.BadSuccessException as e: except scram.BadSuccessException as e:
log.warning('%s: SASL authentication failed with SCRAM error: %e', log.warning('%s: SASL authentication failed with SCRAM error: %e',
self.network, e) self.network, e)
self.sendMsg(ircmsgs.IrcMsg(command='AUTHENTICATE',
args=('*',)))
self.tryNextSaslMechanism(msg) self.tryNextSaslMechanism(msg)
else: else:
self.sendSaslString(b'') self.sendSaslString(b'')