mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-09-22 19:26:40 +08:00
处理低危漏洞:用户枚举
This commit is contained in:
parent
6cb0fcfd93
commit
99967d35e5
@ -154,7 +154,7 @@ func (s *sAdminSite) AccountLogin(ctx context.Context, in *adminin.AccountLoginI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if mb == nil {
|
if mb == nil {
|
||||||
err = gerror.New("账号不存在")
|
err = gerror.New("用户名或密码错误")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ func CheckPassword(input, salt, hash string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if hash != gmd5.MustEncryptString(password+salt) {
|
if hash != gmd5.MustEncryptString(password+salt) {
|
||||||
err = gerror.New("用户密码不正确")
|
err = gerror.New("用户名或密码错误")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user