summary refs log tree commit diff
path: root/synapse/rest/client/v1/room.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-08-02 15:03:27 +0100
committerRichard van der Hoff <richard@matrix.org>2018-08-02 15:03:27 +0100
commit0bf5ec0db700f189ba36360ea8424d9761658905 (patch)
tree19c355260737f534fcb992a1eab3a99f41825553 /synapse/rest/client/v1/room.py
parentchangelog (diff)
downloadsynapse-0bf5ec0db700f189ba36360ea8424d9761658905.tar.xz
Check room visibility for /event/ requests
Make sure that the user has permission to view the requeseted event for
/event/{eventId} and /room/{roomId}/event/{eventId} requests.

Also check that the event is in the given room for
/room/{roomId}/event/{eventId}, for sanity.
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r--synapse/rest/client/v1/room.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 3d62447854..2a679ac830 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -508,7 +508,7 @@ class RoomEventServlet(ClientV1RestServlet):
     @defer.inlineCallbacks
     def on_GET(self, request, room_id, event_id):
         requester = yield self.auth.get_user_by_req(request)
-        event = yield self.event_handler.get_event(requester.user, event_id)
+        event = yield self.event_handler.get_event(requester.user, room_id, event_id)
 
         time_now = self.clock.time_msec()
         if event: