forked from 0xWheatyz/SPARC
Security: Add rate limiting to /auth/login and /auth/register endpoints #714
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
/auth/loginand/auth/registerendpoints have no rate limiting. This makes them vulnerable to brute-force attacks and credential stuffing.What to do
slowapifor FastAPI) to the auth router.429 Too Many Requestswith aRetry-Afterheader when the limit is exceeded.RATE_LIMIT_AUTH).Acceptance Criteria
429response.Retry-Afterheader is present in the429response.Reference
Roadmap: P1 Error handling and resilience — No rate limiting on auth endpoints.
[Repo Manager] Already resolved. slowapi rate limiter: 5/min on register, 10/min on login. 429 response with Retry-After header.
Closing as already implemented in the codebase.