From fb70b5d207d8a0c3c2ce9eb04b361146a347d894 Mon Sep 17 00:00:00 2001 From: mrsdizzie Date: Fri, 21 Aug 2020 18:42:23 -0400 Subject: Disable password complexity check default (#12557) * Disable password complexity check default These features enourange bad passwords/are annoying for people using better password methods, and at minimum we shouldn't force that as a default for obvious reasons. Disable any default check to avoid regular complaints. * fix copy paste format --- modules/setting/setting.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/setting') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index f7edd8e507..ae15f68faa 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -825,6 +825,9 @@ func NewContext() { InternalToken = loadInternalToken(sec) cfgdata := sec.Key("PASSWORD_COMPLEXITY").Strings(",") + if len(cfgdata) == 0 { + cfgdata = []string{"off"} + } PasswordComplexity = make([]string, 0, len(cfgdata)) for _, name := range cfgdata { name := strings.ToLower(strings.Trim(name, `"`)) -- cgit v1.2.3