diff options
author | Neil Johnson <neil@fragile.org.uk> | 2018-08-16 21:25:16 +0100 |
---|---|---|
committer | Neil Johnson <neil@fragile.org.uk> | 2018-08-16 21:25:16 +0100 |
commit | 372bf073c1a5ac5e66cca717ce9aa72c43ba9404 (patch) | |
tree | cf878c55a65bd7139f463410d9bfbcbad212503d /synapse/handlers/room.py | |
parent | Merge pull request #3705 from matrix-org/erikj/fix_inbound_fed_worker (diff) | |
download | synapse-372bf073c1a5ac5e66cca717ce9aa72c43ba9404.tar.xz |
block event creation and room creation on hitting resource limits
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 6a17c42238..c3f820b975 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -98,9 +98,13 @@ class RoomCreationHandler(BaseHandler): Raises: SynapseError if the room ID couldn't be stored, or something went horribly wrong. + ResourceLimitError if server is blocked to some resource being + exceeded """ user_id = requester.user.to_string() + self.auth.check_auth_blocking(user_id) + if not self.spam_checker.user_may_create_room(user_id): raise SynapseError(403, "You are not permitted to create rooms") |