rate_limit: Rate limit the /accounts/find/ endpoint.

Closes #19287

This endpoint allows submitting multiple addresses so we need to "weigh"
the rate limit more heavily the more emails are submitted. Clearly e.g.
a request triggering emails to 2 addresses should weigh twice as much as
a request doing that for just 1 address.
This commit is contained in:
Mateusz Mandera
2021-08-05 11:13:22 +02:00
committed by Mateusz Mandera
parent 29b3e81dd4
commit ddcfd9e2ee
4 changed files with 45 additions and 0 deletions

View File

@@ -265,6 +265,7 @@ RATE_LIMITING_RULES: Dict[str, List[Tuple[int, int]]] = {
"api_by_remote_server": [],
"authenticate_by_username": [],
"create_realm_by_ip": [],
"find_account_by_ip": [],
"password_reset_form_by_email": [],
}