mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
remote_billing: Add rate-limiting for confirmation email sending.
These should be rate-limited by both IP using our regular sends_email_by_ip bucket as well as by server, using a new bucket dedicated to this.
This commit is contained in:
committed by
Tim Abbott
parent
07c4291749
commit
649b4885e8
@@ -291,6 +291,12 @@ DEFAULT_RATE_LIMITING_RULES = {
|
||||
# 1000 per day per file
|
||||
(86400, 1000),
|
||||
],
|
||||
# A zilencer-only limit that applies to requests to the
|
||||
# remote billing system that trigger the sending of an email.
|
||||
"sends_email_by_remote_server": [
|
||||
# 10 emails per day
|
||||
(86400, 10),
|
||||
],
|
||||
}
|
||||
# Rate limiting defaults can be individually overridden by adding
|
||||
# entries in this object, which is merged with
|
||||
|
@@ -256,6 +256,7 @@ RATE_LIMITING_RULES: Dict[str, List[Tuple[int, int]]] = {
|
||||
"sends_email_by_ip": [],
|
||||
"email_change_by_user": [],
|
||||
"password_reset_form_by_email": [],
|
||||
"sends_email_by_remote_server": [],
|
||||
}
|
||||
|
||||
CLOUD_FREE_TRIAL_DAYS: Optional[int] = None
|
||||
|
Reference in New Issue
Block a user