Skip to content

Commit

Permalink
coretasks: backport SASL abort from #2187
Browse files Browse the repository at this point in the history
tl;dr: If the server sends something unrecognized, the correct behavior
is to abort authentication explicitly rather than silently ignoring it.
  • Loading branch information
dgw committed Oct 5, 2021
1 parent a992d56 commit 36d9be9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sopel/coretasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,11 @@ def auth_proceed(bot, trigger):
"""
if trigger.args[0] != '+':
# How did we get here? I am not good with computer.
LOGGER.info(
"Aborting SASL: unexpected server reply '%s'" % trigger)
# Send `authenticate-abort` command
# See https://ircv3.net/specs/extensions/sasl-3.1#the-authenticate-command
bot.write(('AUTHENTICATE', '*'))
return
# Is this right?
if bot.config.core.auth_method == 'sasl':
Expand Down

0 comments on commit 36d9be9

Please sign in to comment.