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
1 changed files with 2 additions and 0 deletions

View File

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