diff options
author | Shay <hillerys@element.io> | 2024-07-22 02:33:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-22 10:33:17 +0100 |
commit | dc8ddc6472ba19905b3fd0c4f4da4088223e03b0 (patch) | |
tree | 19a2edc53c48d7a3d1c4c6dccef79a0b9c4fc806 /synapse/rest/media/thumbnail_resource.py | |
parent | Add a cache on `get_rooms_for_local_user_where_membership_is` (#17460) (diff) | |
download | synapse-dc8ddc6472ba19905b3fd0c4f4da4088223e03b0.tar.xz |
Prepare for authenticated media freeze (#17433)
As part of the rollout of [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3916-authentication-for-media.md) this PR adds support for designating authenticated media and ensuring that authenticated media is not served over unauthenticated endpoints.
Diffstat (limited to 'synapse/rest/media/thumbnail_resource.py')
-rw-r--r-- | synapse/rest/media/thumbnail_resource.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/media/thumbnail_resource.py b/synapse/rest/media/thumbnail_resource.py index 70354aa439..536fea4c32 100644 --- a/synapse/rest/media/thumbnail_resource.py +++ b/synapse/rest/media/thumbnail_resource.py @@ -96,6 +96,7 @@ class ThumbnailResource(RestServlet): m_type, max_timeout_ms, False, + allow_authenticated=False, ) else: await self.thumbnail_provider.respond_local_thumbnail( @@ -107,6 +108,7 @@ class ThumbnailResource(RestServlet): m_type, max_timeout_ms, False, + allow_authenticated=False, ) self.media_repo.mark_recently_accessed(None, media_id) else: @@ -134,6 +136,7 @@ class ThumbnailResource(RestServlet): m_type, max_timeout_ms, ip_address, - False, + use_federation=False, + allow_authenticated=False, ) self.media_repo.mark_recently_accessed(server_name, media_id) |