universal-hashing-sha256
This commit is contained in:
@@ -163,7 +163,7 @@ func UpdateProfileResolver(ctx context.Context, params model.UpdateProfileInput)
|
||||
}
|
||||
|
||||
if isPasswordChanging && user.Password != nil && params.OldPassword != nil {
|
||||
if err = bcrypt.CompareHashAndPassword([]byte(refs.StringValue(user.Password)), []byte(refs.StringValue(params.OldPassword))); err != nil {
|
||||
if err = crypto.VerifyPassword(refs.StringValue(user.Password), refs.StringValue(params.OldPassword)); err != nil {
|
||||
log.Debug("Failed to compare hash and old password: ", err)
|
||||
return res, fmt.Errorf("incorrect old password")
|
||||
}
|
||||
|
Reference in New Issue
Block a user