summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
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"))