mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-06 18:50:09 +01: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
|
// MatchPassword returns true is password matched
|
||||||
func matchPassword(u *models.User, password string) bool {
|
func matchPassword(u *models.User, password string) bool {
|
||||||
if u.Password != utils.Encrypt(password, u.Salt, u.PasswordVersion) {
|
return utils.Encrypt(password, u.Salt, u.PasswordVersion) == u.Password
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user