From fd3f878a484dd5d7a3ca5332a357436827612120 Mon Sep 17 00:00:00 2001 From: Bwko Date: Sat, 24 Dec 2016 15:04:43 +0100 Subject: [PATCH] Simplified MinPasswordLength check --- modules/setting/setting.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 8dab8041f1669..fad884ae1ee76 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -590,11 +590,7 @@ please consider changing to GITEA_CUSTOM`) CookieUserName = sec.Key("COOKIE_USERNAME").MustString("gitea_awesome") CookieRememberName = sec.Key("COOKIE_REMEMBER_NAME").MustString("gitea_incredible") ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER") - MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt() - - if MinPasswordLength == 0 { - MinPasswordLength = 6 - } + MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt(6) sec = Cfg.Section("attachment") AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments"))