fix unmarshal panic
This commit is contained in:
@@ -18,13 +18,13 @@ func (p *Prosody) ChangePassword(user string, currentPwd string, newPwd string)
|
||||
return fmt.Errorf("p.loadAccount %w", err)
|
||||
}
|
||||
|
||||
storedKey, err := hashPassword(currentPwd, acc.salt, acc.iterationCount)
|
||||
storedKey, err := hashPassword(currentPwd, acc.Salt, acc.IterationCount)
|
||||
if err != nil {
|
||||
return fmt.Errorf("hashPassword: %w", err)
|
||||
}
|
||||
|
||||
// Compare the hashes
|
||||
if storedKey != acc.storedKey {
|
||||
if storedKey != acc.StoredKey {
|
||||
return errors.New("password is incorrect")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user