summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-04 09:43:20 +0000
committerErik Johnston <erik@matrix.org>2016-03-04 09:43:20 +0000
commit44b084a75e8c54ad395ddaf0fb96fd694f46f56a (patch)
tree1adc55a4ed365e973d6cfd3ef8510aaded804756
parentMerge pull request #610 from Rugvip/unique-user (diff)
parenthandlers/_base: don't allow room create event to be changed (diff)
downloadsynapse-44b084a75e8c54ad395ddaf0fb96fd694f46f56a.tar.xz
Merge pull request #596 from Rugvip/create
handlers/_base: don't allow room create event to be changed
Diffstat (limited to '')
-rw-r--r--synapse/handlers/_base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index c6a74b0e3d..4d9787c1a8 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -374,6 +374,12 @@ class BaseHandler(object):
                         "You don't have permission to redact events"
                     )
 
+        if event.type == EventTypes.Create and context.current_state:
+            raise AuthError(
+                403,
+                "Changing the room create event is forbidden",
+            )
+
         action_generator = ActionGenerator(self.hs)
         yield action_generator.handle_push_actions_for_event(
             event, context, self