diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-08-21 18:42:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-21 18:42:23 -0400 |
commit | fb70b5d207d8a0c3c2ce9eb04b361146a347d894 (patch) | |
tree | 94ad1f05acae5520447599997f4f4bfe8375f257 /modules/setting | |
parent | 7c2cf236f8a54038e1688e6256e6c32b8b4e6913 (diff) | |
download | gitea-fb70b5d207d8a0c3c2ce9eb04b361146a347d894.tar.gz gitea-fb70b5d207d8a0c3c2ce9eb04b361146a347d894.zip |
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
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 3 |
1 files changed, 3 insertions, 0 deletions
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, `"`)) |