|
@@ -1130,8 +1130,12 @@ func nsConfirmPassword(server *Server, account, passphrase string) (errorMessage
|
1130
|
1130
|
errorMessage = `You're not logged into an account`
|
1131
|
1131
|
} else {
|
1132
|
1132
|
hash := accountData.Credentials.PassphraseHash
|
1133
|
|
- if hash != nil && passwd.CompareHashAndPassword(hash, []byte(passphrase)) != nil {
|
1134
|
|
- errorMessage = `Password incorrect`
|
|
1133
|
+ if hash != nil {
|
|
1134
|
+ if passphrase == "" {
|
|
1135
|
+ errorMessage = `You must supply a password`
|
|
1136
|
+ } else if passwd.CompareHashAndPassword(hash, []byte(passphrase)) != nil {
|
|
1137
|
+ errorMessage = `Password incorrect`
|
|
1138
|
+ }
|
1135
|
1139
|
}
|
1136
|
1140
|
}
|
1137
|
1141
|
return
|