mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 11:12:44 +01:00
Merge pull request #1819 from slingamn/password_message
fix error message for NS SET EMAIL without the password
This commit is contained in:
commit
4a3ac617a5
@ -1130,8 +1130,12 @@ func nsConfirmPassword(server *Server, account, passphrase string) (errorMessage
|
||||
errorMessage = `You're not logged into an account`
|
||||
} else {
|
||||
hash := accountData.Credentials.PassphraseHash
|
||||
if hash != nil && passwd.CompareHashAndPassword(hash, []byte(passphrase)) != nil {
|
||||
errorMessage = `Password incorrect`
|
||||
if hash != nil {
|
||||
if passphrase == "" {
|
||||
errorMessage = `You must supply a password`
|
||||
} else if passwd.CompareHashAndPassword(hash, []byte(passphrase)) != nil {
|
||||
errorMessage = `Password incorrect`
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user