mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
update error
This commit is contained in:
parent
2a7c97f417
commit
4789981c95
@ -99,7 +99,7 @@ func authenticator() func(c *gin.Context) (interface{}, error) {
|
|||||||
|
|
||||||
if user.RejectPassword {
|
if user.RejectPassword {
|
||||||
model.BlockIP(singleton.DB, realip, model.WAFBlockReasonTypeLoginFail, int64(user.ID))
|
model.BlockIP(singleton.DB, realip, model.WAFBlockReasonTypeLoginFail, int64(user.ID))
|
||||||
return nil, jwt.ErrForbidden
|
return nil, jwt.ErrFailedAuthentication
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(loginVals.Password)); err != nil {
|
if err := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(loginVals.Password)); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user