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/handlers/federation.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/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 598a66f74c..3ebee38ebe 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1711,7 +1711,7 @@ class FederationHandler(BaseHandler): member_handler = self.hs.get_room_member_handler() # We don't rate limit based on room ID, as that should be done by # sending server. - member_handler.ratelimit_invite(None, event.state_key) + await member_handler.ratelimit_invite(None, None, event.state_key) # keep a record of the room version, if we don't yet know it. # (this may get overwritten if we later get a different room version in a |