3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-14 07:59:31 +01:00

sasl: Always send a 906 in response to AUTHENTICATE *

This commit is contained in:
Daniel Oaks 2017-06-30 11:06:10 +10:00
parent 7735ddfa03
commit c0fbc7908d

View File

@ -90,11 +90,7 @@ func loadAccount(server *Server, tx *buntdb.Tx, accountKey string) *ClientAccoun
func authenticateHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { func authenticateHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
// sasl abort // sasl abort
if !server.accountAuthenticationEnabled || len(msg.Params) == 1 && msg.Params[0] == "*" { if !server.accountAuthenticationEnabled || len(msg.Params) == 1 && msg.Params[0] == "*" {
if client.saslInProgress { client.Send(nil, server.name, ERR_SASLABORTED, client.nick, "SASL authentication aborted")
client.Send(nil, server.name, ERR_SASLABORTED, client.nick, "SASL authentication aborted")
} else {
client.Send(nil, server.name, ERR_SASLFAIL, client.nick, "SASL authentication failed")
}
client.saslInProgress = false client.saslInProgress = false
client.saslMechanism = "" client.saslMechanism = ""
client.saslValue = "" client.saslValue = ""