diff options
author | Patrik Oldsberg <patrik.oldsberg@ericsson.com> | 2016-02-22 22:55:21 +0100 |
---|---|---|
committer | Patrik Oldsberg <patrik.oldsberg@ericsson.com> | 2016-02-23 00:22:41 +0100 |
commit | 210b7d8e004e5d107a95572860dcc3d7c5b66fdd (patch) | |
tree | 8ac4b81af55144197f383d302aaccaf3b28322c0 /synapse/handlers/_base.py | |
parent | Merge pull request #587 from matrix-org/rav/guest_access_after_room_join (diff) | |
download | synapse-210b7d8e004e5d107a95572860dcc3d7c5b66fdd.tar.xz |
handlers/_base: don't allow room create event to be changed
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index 5613bd2059..5b27ec1362 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -342,6 +342,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 |