mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-17 03:14:28 -05:00
Don't process /send requests for users who have hit their ratelimit (#13134)
This commit is contained in:
parent
8330fc9953
commit
046a6513bc
1
changelog.d/13134.misc
Normal file
1
changelog.d/13134.misc
Normal file
@ -0,0 +1 @@
|
||||
Apply ratelimiting earlier in processing of /send request.
|
@ -903,6 +903,9 @@ class EventCreationHandler:
|
||||
await self.clock.sleep(random.randint(1, 10))
|
||||
raise ShadowBanError()
|
||||
|
||||
if ratelimit:
|
||||
await self.request_ratelimiter.ratelimit(requester, update=False)
|
||||
|
||||
# We limit the number of concurrent event sends in a room so that we
|
||||
# don't fork the DAG too much. If we don't limit then we can end up in
|
||||
# a situation where event persistence can't keep up, causing
|
||||
|
Loading…
Reference in New Issue
Block a user