mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-31 11:52:41 +00:00
fix some statements
This commit is contained in:
parent
07563a1845
commit
90acced7c1
@ -85,10 +85,7 @@ func configDefault(config ...Config) Config {
|
||||
if cfg.Authorizer == nil {
|
||||
cfg.Authorizer = func(user, pass string) bool {
|
||||
userPwd, exist := cfg.Users[user]
|
||||
if !exist {
|
||||
return false
|
||||
}
|
||||
return subtle.ConstantTimeCompare(utils.UnsafeBytes(userPwd), utils.UnsafeBytes(pass)) == 1
|
||||
return exist && subtle.ConstantTimeCompare(utils.UnsafeBytes(userPwd), utils.UnsafeBytes(pass)) == 1
|
||||
}
|
||||
}
|
||||
if cfg.Unauthorized == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user