Browse Source

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

* Restore IsPasswordSet previous value

* Update models/user.go
tags/v1.10.3
zeripath 5 years ago committed by Lauris BH
parent
commit
0e5126da22
  1. 2
      models/user.go

2
models/user.go

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

Loading…
Cancel
Save