Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Allow MSC3030 'timestamp_to_event' calls from anyone on world-readabl…
Browse files Browse the repository at this point in the history
…e rooms. (#13062)

Signed-off-by: Quentin Gliech <[email protected]>
  • Loading branch information
sandhose authored Jun 17, 2022
1 parent 9372f6f commit c6d6176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/13062.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow MSC3030 'timestamp_to_event' calls from anyone on world-readable rooms.
4 changes: 3 additions & 1 deletion synapse/rest/client/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,9 @@ async def on_GET(
self, request: SynapseRequest, room_id: str
) -> Tuple[int, JsonDict]:
requester = await self._auth.get_user_by_req(request)
await self._auth.check_user_in_room(room_id, requester.user.to_string())
await self._auth.check_user_in_room_or_world_readable(
room_id, requester.user.to_string()
)

timestamp = parse_integer(request, "ts", required=True)
direction = parse_string(request, "dir", default="f", allowed_values=["f", "b"])
Expand Down

0 comments on commit c6d6176

Please sign in to comment.