You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(auth): resolve goto-over-variable compilation errors in web and LDAP login
- Replace goto-based whitelist skip with an if-guarded skipLimit flag
- Gate all LoginCache.Set(ip, count+1) calls behind !skipLimit check
- Eliminates "goto auth jumps over declaration" and "declared and not used" errors
- Same approach already used correctly in SFTP, FTP, and WebDAV handlers
Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
{Key: conf.AuthLoginMaxRetries, Value: strconv.Itoa(model.DefaultMaxAuthRetries), Type: conf.TypeNumber, Group: model.SITE, Flag: model.PRIVATE, Help: "Max login retry attempts per IP. Set to -1 to disable rate limiting."},
118
+
{Key: conf.AuthLoginLockDuration, Value: strconv.Itoa(int(model.DefaultLockDuration/time.Minute)), Type: conf.TypeNumber, Group: model.SITE, Flag: model.PRIVATE, Help: "Lock duration in minutes after exceeding max retries."},
119
+
{Key: conf.AuthLoginIPWhitelist, Value: "", Type: conf.TypeText, Group: model.SITE, Flag: model.PRIVATE, Help: "Whitelisted IPs or CIDR ranges, one per line. IPs in this list are exempt from login rate limiting."},
120
+
{Key: conf.AuthLoginIPBlacklist, Value: "", Type: conf.TypeText, Group: model.SITE, Flag: model.PRIVATE, Help: "Blacklisted IPs or CIDR ranges, one per line. Login from these IPs will be denied."},
0 commit comments