Changeset 721 in code for trunk/downstream.go


Ignore:
Timestamp:
Nov 19, 2021, 5:55:07 PM (4 years ago)
Author:
contact
Message:

Abort SASL if in-progress while completing registration

Implements the following recommendation from the spec:

If the client completes registration (with CAP END, NICK, USER and any other
necessary messages) while the SASL authentication is still in progress, the
server SHOULD abort it and send a 906 numeric, then register the client
without authentication.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r720 r721  
    11111111        }
    11121112
     1113        if dc.saslServer != nil {
     1114                dc.saslServer = nil
     1115                dc.SendMessage(&irc.Message{
     1116                        Prefix:  dc.srv.prefix(),
     1117                        Command: irc.ERR_SASLABORTED,
     1118                        Params:  []string{"*", "SASL authentication aborted"},
     1119                })
     1120        }
     1121
    11131122        password := dc.password
    11141123        dc.password = ""
Note: See TracChangeset for help on using the changeset viewer.