1
0
Fork 0
forked from forgejo/forgejo

Added minimum password length to app.ini (#223)

This commit is contained in:
Bwko 2016-12-24 14:40:44 +01:00 committed by Lunny Xiao
parent d0932ef147
commit f27d87d93b
4 changed files with 17 additions and 4 deletions

View file

@ -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"))