0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 22:33:51 +01:00

Enable guest access on new media endpoints, per MSC4189 (#17675)

This commit is contained in:
Travis Ralston 2024-09-10 11:29:24 -06:00 committed by GitHub
parent e06e3c4004
commit a7fcac5648
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -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).

View file

@ -138,7 +138,7 @@ class ThumbnailResource(RestServlet):
) -> 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)
@ -229,7 +229,7 @@ class DownloadResource(RestServlet):
# 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)