-
Notifications
You must be signed in to change notification settings - Fork 32
Possible race condition with truncated nicks #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is this also the cause of matrix-org/matrix-appservice-irc#27 (comment)? |
@Mikaela I don't know Ergo as much as I should, but if it doesn't explicitly issue a NICK on connection when it forces the nick change, then yeah, probably. |
If I'm understanding the context correctly, this is correct and is actually quite likely to occur with Ergo, because of |
When a
Client
is given a nick that's longer than the server's allowed nick length, the server might silently truncate the nick. WhenRPL_WELCOME
is sent, it changes the nick to the correct one.However, if a user is using SASL, it emits the 'registered' event on either SASL failure or success, which is before
RPL_WELCOME
. So in theconnect
callback, if the user is using SASL,client.nick
will still be the non-truncated nick. This is why things like matrix-org/matrix-appservice-irc#1393 are happening, the bridge assigns the value ofclient.nick
in the connect callback and stores that for the duration of the connection.I'm not entirely sure why it's emitting
registered
on SASL replies, sinceRPL_WELCOME
will be sent no matter what.The text was updated successfully, but these errors were encountered: