forked from forgejo/forgejo
Merge pull request #1211 from mephux/hotfix/type-fix-ValidatePassword
Hotfix/type fix validate password
This commit is contained in:
commit
673a76d638
4 changed files with 5 additions and 5 deletions
|
@ -143,8 +143,8 @@ func (u *User) EncodePasswd() {
|
|||
u.Passwd = fmt.Sprintf("%x", newPasswd)
|
||||
}
|
||||
|
||||
// ValidtePassword checks if given password matches the one belongs to the user.
|
||||
func (u *User) ValidtePassword(passwd string) bool {
|
||||
// ValidatePassword checks if given password matches the one belongs to the user.
|
||||
func (u *User) ValidatePassword(passwd string) bool {
|
||||
newUser := &User{Passwd: passwd, Salt: u.Salt}
|
||||
newUser.EncodePasswd()
|
||||
return u.Passwd == newUser.Passwd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue