Cleanup obsolete tasks, simplify auth lock logic, increase test retry wait
- Remove completed Task 17 and 18 from Docs/tasks.md - Remove ANIWORLD_TESTING bypass in _check_locked (testing env now uses test auth service) - Remove redundant lock expiry cleanup (handled by _get_fail_record) - Fix login.html whitespace formatting - Increase setup retry wait from 6s to 45s for rate-limited CI environments
This commit is contained in:
@@ -186,22 +186,12 @@ class AuthService:
|
||||
self._failed.pop(identifier, None)
|
||||
|
||||
def _check_locked(self, identifier: str) -> None:
|
||||
import os
|
||||
if os.getenv("ANIWORLD_TESTING") == "1":
|
||||
return
|
||||
rec = self._get_fail_record(identifier)
|
||||
lu = rec.get("locked_until")
|
||||
if lu and datetime.now(timezone.utc) < lu:
|
||||
raise LockedOutError(
|
||||
"Too many failed attempts - temporarily locked out"
|
||||
)
|
||||
if lu and datetime.now(timezone.utc) >= lu:
|
||||
# lock expired, reset
|
||||
self._failed[identifier] = {
|
||||
"count": 0,
|
||||
"last": None,
|
||||
"locked_until": None,
|
||||
}
|
||||
|
||||
# --- authentication ---
|
||||
def validate_master_password(
|
||||
|
||||
Reference in New Issue
Block a user