sopel icon indicating copy to clipboard operation
sopel copied to clipboard

Stuck if configured to use SASL but server NAKs the capability

Open progval opened this issue 9 years ago • 3 comments

Config file:

[core]
nick = Sopel
host = 0.0.0.0
use_ssl = false
port = 39154
owner = me
channels = 
sasl_username = jilles
sasl_password = sesame
sasl_mechanism = PLAIN
auth_method = sasl

Raw logs:

>>1450542318.5877385    CAP LS 302
>>1450542318.5879178    NICK Sopel
>>1450542318.5880473    USER sopel +iw Sopel :Sopel: http://sopel.chat
<<1450542318.588655 CAP * LS :
>>1450542318.588997 CAP REQ multi-prefix
>>1450542318.589132 CAP REQ sasl
<<1450542318.6277814    CAP * NAK :multi-prefix
<<1450542318.6675858    
<<1450542318.6681972    CAP * NAK :sasl
>>1450542560.3821402    PING 0.0.0.0

Version: 047a99ed2d3f76c7d54e5bacaac1c1d38d1b743c (Git master at the time I am writing this)

progval avatar Dec 19 '15 16:12 progval

Note: the behavior does not change if * is replaced by the nick in the two NAKs.

progval avatar Dec 19 '15 16:12 progval

Kind of the same problem (the lack of handling error case/non-nominal case) as in #976

Exirel avatar Mar 21 '19 22:03 Exirel

"4 minutes" is clearly server-dependent (testing this just now on a network that doesn't advertise the sasl CAP, it went to ERROR :Closing Link: ww.xx.yy.zz (Registration timed out) after only about 30 seconds, at which point Sopel did its standard "Disconnected. Reconnecting in 20 seconds..." routine. However the bug itself is confirmed.

My preferred resolution would be to quit on receiving CAP NAK :sasl, with a log message telling the user that the authentication mechanism they configured is not supported on that network. Likely to go hand-in-hand with #972, which already merits refactoring how CAP negotiations work.

dgw avatar Jun 22 '21 23:06 dgw