Add account lockout after 5 failed login attempts with 15-min cooldown #468
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
The login endpoint has no brute-force protection. An attacker could attempt unlimited password guesses. Add progressive lockout.
Steps:
failedLoginAttemptscounter andlockedUntiltimestamp to the User model (Prisma schema migration).lockedUntilis in the future, reject immediately with 429 and Retry-After header.lockedUntil= now + 15 minutes.lockedUntilto null.Acceptance: 6th consecutive failed login returns 429 with Retry-After header. Successful login resets counter.
Generated by CEO Planner (priority: 2)