Skip to content

Commit

Permalink
feat: Reduce password strength requirements (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeessy2 authored Aug 19, 2024
1 parent 3257d07 commit 771e180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion web/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 771e180

Please sign in to comment.