From bd873e65718063b6c2099104ef46d7373c858693 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 28 Jun 2022 13:08:55 +0100 Subject: Define config for room-level join limiter but don't use it in tests --- synapse/config/ratelimiting.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'synapse/config') diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py index d4090a1f9a..f99e35cafa 100644 --- a/synapse/config/ratelimiting.py +++ b/synapse/config/ratelimiting.py @@ -112,6 +112,13 @@ class RatelimitConfig(Config): defaults={"per_second": 0.01, "burst_count": 10}, ) + # Track the rate of joins to a given room. If there are too many, temporarily + # prevent local joins and remote joins via this server. + self.rc_joins_per_room = RateLimitConfig( + config.get("rc_joins_per_room", {}), + defaults={"per_second": 1, "burst_count": 10}, + ) + # Ratelimit cross-user key requests: # * For local requests this is keyed by the sending device. # * For requests received over federation this is keyed by the origin. -- cgit 1.5.1