summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2016-12-24 15:42:11 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2016-12-24 22:42:11 +0800
commitc1e92eeb72fe92cc30c80985e5e2b970f4735067 (patch)
treeec15705eff51a85731bdbda54b98731a561fb089 /modules
parenta345a03d99f6e3d46a20620869e29424a0c55499 (diff)
downloadgitea-c1e92eeb72fe92cc30c80985e5e2b970f4735067.tar.gz
gitea-c1e92eeb72fe92cc30c80985e5e2b970f4735067.zip
Simplified MinPasswordLength check (#475)
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 8dab8041f1..fad884ae1e 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"))