diff options
author | Erik Johnston <erik@matrix.org> | 2021-03-30 12:06:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 12:06:09 +0100 |
commit | 963f4309fe29206f3ba92b493e922280feea30ed (patch) | |
tree | 67250b7423dc4a0a1b47626efa55d69ea032f51d /synapse/server.py | |
parent | Update changelog (diff) | |
download | synapse-963f4309fe29206f3ba92b493e922280feea30ed.tar.xz |
Make RateLimiter class check for ratelimit overrides (#9711)
This should fix a class of bug where we forget to check if e.g. the appservice shouldn't be ratelimited. We also check the `ratelimit_override` table to check if the user has ratelimiting disabled. That table is really only meant to override the event sender ratelimiting, so we don't use any values from it (as they might not make sense for different rate limits), but we do infer that if ratelimiting is disabled for the user we should disabled all ratelimits. Fixes #9663
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py index e85b9391fa..e42f7b1a18 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -329,6 +329,7 @@ class HomeServer(metaclass=abc.ABCMeta): @cache_in_self def get_registration_ratelimiter(self) -> Ratelimiter: return Ratelimiter( + store=self.get_datastore(), clock=self.get_clock(), rate_hz=self.config.rc_registration.per_second, burst_count=self.config.rc_registration.burst_count, |