diff --git a/config/config.go b/config/config.go index 55c23de1d..e37e60340 100755 --- a/config/config.go +++ b/config/config.go @@ -205,9 +205,9 @@ func (conf *Config) ResetPassword(newPassword string) { // CheckPassword 检查密码 func (conf *Config) CheckPassword(newPassword string) (hashedPwd string, err error) { - var minEntropyBits float64 = 50 + var minEntropyBits float64 = 30 if conf.NotAllowWanAccess { - minEntropyBits = 25 + minEntropyBits = 20 } err = passwordvalidator.Validate(newPassword, minEntropyBits) if err != nil { diff --git a/web/login.go b/web/login.go index a0db43c1f..3e28e5599 100755 --- a/web/login.go +++ b/web/login.go @@ -158,7 +158,7 @@ func loginUnlock() (minute uint32) { go func(ticker *time.Ticker) { for range ticker.C { - ld.failedTimes = 0 + ld.failedTimes = 4 ticker.Stop() } }(ld.ticker)