diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-23 16:07:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 16:07:46 -0500 |
commit | f8a584ed0259cbb3c3a51726d1008d04c26b4bd8 (patch) | |
tree | bd33166a29b47fb9ae2919377b8aaf05e858d317 /synapse/rest/media | |
parent | Fix a typo in MSC3873 config option. (#15138) (diff) | |
download | synapse-f8a584ed0259cbb3c3a51726d1008d04c26b4bd8.tar.xz |
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.
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/thumbnail_resource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/thumbnail_resource.py b/synapse/rest/media/v1/thumbnail_resource.py index 5f725c7600..3e720018b3 100644 --- a/synapse/rest/media/v1/thumbnail_resource.py +++ b/synapse/rest/media/v1/thumbnail_resource.py @@ -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: |