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

Commit c6d6176

Browse files
authored
Allow MSC3030 'timestamp_to_event' calls from anyone on world-readable rooms. (#13062)
Signed-off-by: Quentin Gliech <[email protected]>
1 parent 9372f6f commit c6d6176

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog.d/13062.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allow MSC3030 'timestamp_to_event' calls from anyone on world-readable rooms.

synapse/rest/client/room.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,9 @@ async def on_GET(
11771177
self, request: SynapseRequest, room_id: str
11781178
) -> Tuple[int, JsonDict]:
11791179
requester = await self._auth.get_user_by_req(request)
1180-
await self._auth.check_user_in_room(room_id, requester.user.to_string())
1180+
await self._auth.check_user_in_room_or_world_readable(
1181+
room_id, requester.user.to_string()
1182+
)
11811183

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

0 commit comments

Comments
 (0)