Skip to content

Commit c1e92ee

Browse files
Bwkolunny
authored andcommitted
Simplified MinPasswordLength check (#475)
1 parent a345a03 commit c1e92ee

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

modules/setting/setting.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,7 @@ please consider changing to GITEA_CUSTOM`)
590590
CookieUserName = sec.Key("COOKIE_USERNAME").MustString("gitea_awesome")
591591
CookieRememberName = sec.Key("COOKIE_REMEMBER_NAME").MustString("gitea_incredible")
592592
ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER")
593-
MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt()
594-
595-
if MinPasswordLength == 0 {
596-
MinPasswordLength = 6
597-
}
593+
MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt(6)
598594

599595
sec = Cfg.Section("attachment")
600596
AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments"))

0 commit comments

Comments
 (0)