summary refs log tree commit diff
path: root/synapse/config/ratelimiting.py
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-31 14:33:17 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-31 14:33:17 +0100
commit3cd1277a7bec03703e9a80c4f07b7f3fcfddadf7 (patch)
treef4153834a8bbe29af1bba82d62c3558ed7cc604a /synapse/config/ratelimiting.py
parentMerge branch 'release-v1.41' into matrix-org-hotfixes (diff)
parentMerge branch 'master' into develop (diff)
downloadsynapse-3cd1277a7bec03703e9a80c4f07b7f3fcfddadf7.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/config/ratelimiting.py')
-rw-r--r--synapse/config/ratelimiting.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py

index 7a8d5851c4..f856327bd8 100644 --- a/synapse/config/ratelimiting.py +++ b/synapse/config/ratelimiting.py
@@ -79,6 +79,11 @@ class RatelimitConfig(Config): self.rc_registration = RateLimitConfig(config.get("rc_registration", {})) + self.rc_registration_token_validity = RateLimitConfig( + config.get("rc_registration_token_validity", {}), + defaults={"per_second": 0.1, "burst_count": 5}, + ) + rc_login_config = config.get("rc_login", {}) self.rc_login_address = RateLimitConfig(rc_login_config.get("address", {})) self.rc_login_account = RateLimitConfig(rc_login_config.get("account", {})) @@ -143,6 +148,8 @@ class RatelimitConfig(Config): # is using # - one for registration that ratelimits registration requests based on the # client's IP address. + # - one for checking the validity of registration tokens that ratelimits + # requests based on the client's IP address. # - one for login that ratelimits login requests based on the client's IP # address. # - one for login that ratelimits login requests based on the account the @@ -171,6 +178,10 @@ class RatelimitConfig(Config): # per_second: 0.17 # burst_count: 3 # + #rc_registration_token_validity: + # per_second: 0.1 + # burst_count: 5 + # #rc_login: # address: # per_second: 0.17