diff options
author | Erik Johnston <erik@matrix.org> | 2019-05-02 15:23:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-05-02 15:23:08 +0100 |
commit | 176f31c2e3e048353c4382cf5d1a34a1359f48b1 (patch) | |
tree | 28ac71dd761e2a424b1da6ecf0510a27480ac67a /synapse | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/ratelimit_... (diff) | |
download | synapse-176f31c2e3e048353c4382cf5d1a34a1359f48b1.tar.xz |
Rate limit early
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/room_member.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index ad3df7cc7d..3e86b9c690 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -710,8 +710,9 @@ class RoomMemberHandler(object): Codes.FORBIDDEN, ) - # Check whether we'll be ratelimited - yield self.base_handler.ratelimit(requester, update=False) + # We need to rate limit *before* we send out any 3PID invites, so we + # can't just rely on the standard ratelimiting of events. + yield self.base_handler.ratelimit(requester) invitee = yield self._lookup_3pid( id_server, medium, address |