Skip to content

Commit

Permalink
Enable guest access on new media endpoints, per MSC4189 (#17675)
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live authored Sep 10, 2024
1 parent e06e3c4 commit a7fcac5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/17675.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Guests can use the new media endpoints to download media, as described by [MSC4189](https://github.com/matrix-org/matrix-spec-proposals/pull/4189).
4 changes: 2 additions & 2 deletions synapse/rest/client/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def on_GET(
) -> None:
# Validate the server name, raising if invalid
parse_and_validate_server_name(server_name)
await self.auth.get_user_by_req(request)
await self.auth.get_user_by_req(request, allow_guest=True)

set_cors_headers(request)
set_corp_headers(request)
Expand Down Expand Up @@ -229,7 +229,7 @@ async def on_GET(
# Validate the server name, raising if invalid
parse_and_validate_server_name(server_name)

await self.auth.get_user_by_req(request)
await self.auth.get_user_by_req(request, allow_guest=True)

set_cors_headers(request)
set_corp_headers(request)
Expand Down

0 comments on commit a7fcac5

Please sign in to comment.