forked from External/ergo
fix #455
This commit is contained in:
parent
a27c46f983
commit
174115deb6
5 changed files with 40 additions and 22 deletions
|
|
@ -2229,13 +2229,9 @@ func passHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
|||
|
||||
// check the provided password
|
||||
password := []byte(msg.Params[0])
|
||||
if bcrypt.CompareHashAndPassword(serverPassword, password) != nil {
|
||||
rb.Add(nil, server.name, ERR_PASSWDMISMATCH, client.nick, client.t("Password incorrect"))
|
||||
client.Quit(client.t("Password incorrect"), rb.session)
|
||||
return true
|
||||
}
|
||||
client.sentPassCommand = bcrypt.CompareHashAndPassword(serverPassword, password) == nil
|
||||
|
||||
client.sentPassCommand = true
|
||||
// if they failed the check, we'll bounce them later when they try to complete registration
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue