Changeset 653 in code


Ignore:
Timestamp:
Oct 28, 2021, 9:29:34 AM (4 years ago)
Author:
contact
Message:

Always reply ERR_SASLABORTED on SASL abort

Some clients (Hexchat) always expect AUTHENTICATE * to succeed with
ERR_SASLABORTED even if SASL hasn't been started.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r652 r653  
    602602
    603603                var resp []byte
    604                 if dc.saslServer == nil {
     604                if msg.Params[0] == "*" {
     605                        dc.saslServer = nil
     606                        return ircError{&irc.Message{
     607                                Command: irc.ERR_SASLABORTED,
     608                                Params:  []string{"*", "SASL authentication aborted"},
     609                        }}
     610                } else if dc.saslServer == nil {
    605611                        mech := strings.ToUpper(msg.Params[0])
    606612                        switch mech {
     
    615621                                }}
    616622                        }
    617                 } else if msg.Params[0] == "*" {
    618                         dc.saslServer = nil
    619                         return ircError{&irc.Message{
    620                                 Command: irc.ERR_SASLABORTED,
    621                                 Params:  []string{"*", "SASL authentication aborted"},
    622                         }}
    623623                } else if msg.Params[0] == "+" {
    624624                        resp = nil
Note: See TracChangeset for help on using the changeset viewer.