mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-22 23:31:12 +02:00
refactor: update authentication error handling to prevent user enumeration and improve error messages
This commit is contained in:
parent
2add106296
commit
c1016591da
3 changed files with 14 additions and 44 deletions
|
|
@ -62,7 +62,7 @@ def _rate_limit_exceeded_handler(request: Request, exc: RateLimitExceeded):
|
|||
# ============================================================================
|
||||
# Stricter per-IP limits on auth endpoints to prevent:
|
||||
# - Brute force password attacks
|
||||
# - User enumeration via LOGIN_USER_NOT_FOUND / REGISTER_USER_ALREADY_EXISTS
|
||||
# - User enumeration via REGISTER_USER_ALREADY_EXISTS
|
||||
# - Email spam via forgot-password
|
||||
#
|
||||
# These use direct Redis INCR+EXPIRE for simplicity and reliability.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue