mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-06 01:07:55 +02:00
Merge pull request #9593 from qyqcswill/code_improve
promote code quality
This commit is contained in:
commit
7d04eab63c
@ -290,8 +290,5 @@ func CleanUser(id int64) error {
|
||||
|
||||
// MatchPassword returns true is password matched
|
||||
func matchPassword(u *models.User, password string) bool {
|
||||
if u.Password != utils.Encrypt(password, u.Salt, u.PasswordVersion) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return utils.Encrypt(password, u.Salt, u.PasswordVersion) == u.Password
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user