auth: fix default retry count value

fixes #365, gopkg.in/ini/v1's MustInt(n) only returns `n` if the key's
value was not an integer (i.e. value = foobar). auth_retry_count is not
included in the config, it gets read as zero, and auth isn't attempted
at all.
This commit is contained in:
Harvey Tindall
2024-09-04 20:53:30 +01:00
parent 275d9188bf
commit 2f4e68969a
2 changed files with 3 additions and 239 deletions
+3
View File
@@ -148,6 +148,9 @@ func (app *appContext) loadConfig() error {
LOGIP = app.config.Section("advanced").Key("log_ips").MustBool(false)
LOGIPU = app.config.Section("advanced").Key("log_ips_users").MustBool(false)
app.MustSetValue("advanced", "auth_retry_count", "6")
app.MustSetValue("advanced", "auth_retry_gap", "10")
pwrMethods := []string{"allow_pwr_username", "allow_pwr_email", "allow_pwr_contact_method"}
allDisabled := true
for _, v := range pwrMethods {