summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2016-12-24 14:40:44 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2016-12-24 21:40:44 +0800
commitf27d87d93ba8578dfc36b636de5dc01e26e58d0d (patch)
tree37a3d8ce46093b933f01ad8fec0ba53886cfaa50 /modules
parentd0932ef1473b9ce27474ccf24acfca106dd93fec (diff)
downloadgitea-f27d87d93ba8578dfc36b636de5dc01e26e58d0d.tar.gz
gitea-f27d87d93ba8578dfc36b636de5dc01e26e58d0d.zip
Added minimum password length to app.ini (#223)
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index b15985627d..8dab8041f1 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -96,6 +96,7 @@ var (
CookieUserName string
CookieRememberName string
ReverseProxyAuthUser string
+ MinPasswordLength int
// Database settings
UseSQLite3 bool
@@ -589,6 +590,11 @@ 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
+ }
sec = Cfg.Section("attachment")
AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments"))