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/message.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/message.py')
-rw-r--r-- | synapse/handlers/message.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 893c9bcdc4..4d006df63c 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -276,10 +276,14 @@ class EventCreationHandler(object): where *hashes* is a map from algorithm to hash. If None, they will be requested from the database. - + Raises: + ResourceLimitError if server is blocked to some resource being + exceeded Returns: Tuple of created event (FrozenEvent), Context """ + yield self.auth.check_auth_blocking(requester.user.to_string()) + builder = self.event_builder_factory.new(event_dict) self.validator.validate_new(builder) |