forked from forgejo/forgejo
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:
parent
7c2cf236f8
commit
fb70b5d207
3 changed files with 7 additions and 4 deletions
|
@ -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, `"`))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue