0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-18 18:48:31 +02:00

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

Ideally we would replace this with parsing of the Accept header
or something else, but for now just make Synapse spec compliant
by ignoring the unspecced parameter.

It does not seem that this is ever sent by a client, and even if it is
there's a reasonable fallback.
This commit is contained in:
Patrick Cloke 2023-02-23 16:07:46 -05:00 committed by GitHub
parent ec79870f14
commit f8a584ed02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1 @@
Remove the undocumented and unspecced `type` parameter to the `/thumbnail` endpoint.

View file

@ -69,7 +69,8 @@ class ThumbnailResource(DirectServeJsonResource):
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: