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:
@@ -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, `"`))
|
||||
|
Reference in New Issue
Block a user