fix: add rate limiting to prevent brute force on password reset (#13292)
This commit is contained in:
parent
c8dcde6cd0
commit
982bca5d40
4 changed files with 51 additions and 1 deletions
|
|
@ -59,3 +59,9 @@ class EmailCodeAccountDeletionRateLimitExceededError(BaseHTTPException):
|
|||
error_code = "email_code_account_deletion_rate_limit_exceeded"
|
||||
description = "Too many account deletion emails have been sent. Please try again in 5 minutes."
|
||||
code = 429
|
||||
|
||||
|
||||
class EmailPasswordResetLimitError(BaseHTTPException):
|
||||
error_code = "email_password_reset_limit"
|
||||
description = "Too many failed password reset attempts. Please try again in 24 hours."
|
||||
code = 429
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue