diff options
author | Erik Johnston <erik@matrix.org> | 2016-03-04 09:43:20 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-03-04 09:43:20 +0000 |
commit | 44b084a75e8c54ad395ddaf0fb96fd694f46f56a (patch) | |
tree | 1adc55a4ed365e973d6cfd3ef8510aaded804756 /synapse/handlers/_base.py | |
parent | Merge pull request #610 from Rugvip/unique-user (diff) | |
parent | handlers/_base: don't allow room create event to be changed (diff) | |
download | synapse-44b084a75e8c54ad395ddaf0fb96fd694f46f56a.tar.xz |
Merge pull request #596 from Rugvip/create
handlers/_base: don't allow room create event to be changed
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 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 |