1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
This commit is contained in:
mrsdizzie
2020-08-21 18:42:23 -04:00
committed by GitHub
parent 7c2cf236f8
commit fb70b5d207
3 changed files with 7 additions and 4 deletions

View File

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