Make sure a password reset token can be used only once
This commit is contained in:
parent
787044628f
commit
ac23536c36
1 changed files with 2 additions and 0 deletions
|
@ -63,7 +63,9 @@ func ResetPassword(s *xorm.Session, reset *PasswordReset) (err error) {
|
|||
}
|
||||
|
||||
// Save it
|
||||
user.PasswordResetToken = ""
|
||||
_, err = s.
|
||||
Cols("password", "password_reset_token").
|
||||
Where("id = ?", user.ID).
|
||||
Update(&user)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue