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

Stop parsing the unspecced type parameter on thumbnail requests. #15137

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15137.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the undocumented and unspecced `type` parameter to the `/thumbnail` endpoint.
3 changes: 2 additions & 1 deletion synapse/rest/media/v1/thumbnail_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ async def _async_render_GET(self, request: SynapseRequest) -> None:
width = parse_integer(request, "width", required=True)
height = parse_integer(request, "height", required=True)
method = parse_string(request, "method", "scale")
m_type = parse_string(request, "type", "image/png")
# TODO Parse the Accept header to get an prioritised list of thumbnail types.
m_type = "image/png"

if server_name == self.server_name:
if self.dynamic_thumbnails:
Expand Down