Fix password reset without a reseet token

This commit is contained in:
kolaente 2020-12-30 21:43:14 +01:00
parent c842b70cb5
commit 787044628f
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
3 changed files with 12 additions and 2 deletions

View file

@ -39,6 +39,10 @@ func ResetPassword(s *xorm.Session, reset *PasswordReset) (err error) {
return ErrNoUsernamePassword{}
}
if reset.Token == "" {
return ErrNoPasswordResetToken{}
}
// Check if we have a token
var user User
exists, err := s.