mirror of
https://github.com/goharbor/harbor.git
synced 2024-08-29 23:39:42 +02:00
promote code quality
Signed-off-by: hao.cheng <hao.cheng@daocloud.io>
This commit is contained in:
parent
3810dcef0f
commit
29e905271d
|
@ -293,8 +293,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