1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-13 23:05:48 +00:00

Never allow an empty password to validate (#9682) (#9683)

* Restore IsPasswordSet previous value

* Update models/user.go

Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
zeripath 2020-01-11 14:27:03 +00:00 committed by Lauris BH
parent ff16099c6d
commit 7eaba6ba8a

View File

@ -503,7 +503,7 @@ func (u *User) ValidatePassword(passwd string) bool {
// IsPasswordSet checks if the password is set or left empty
func (u *User) IsPasswordSet() bool {
return len(u.Passwd) > 0
return !u.ValidatePassword("")
}
// UploadAvatar saves custom avatar for user.