diff options
author | Aaron Raimist <aaron@raim.ist> | 2019-05-29 08:27:41 -0500 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-05-29 14:27:41 +0100 |
commit | 30858ff4617517916fc8973b16c6be6e13288bd0 (patch) | |
tree | c2bd001347696a1e6ecfb6c8d1a49abe5691e52e | |
parent | Correctly filter out extremities with soft failed prevs (#5274) (diff) | |
download | synapse-30858ff4617517916fc8973b16c6be6e13288bd0.tar.xz |
Fix error when downloading thumbnail with width/height param missing (#5258)
Fix error when downloading thumbnail with width/height param missing Fixes #2748 Signed-off-by: Aaron Raimist <aaron@raim.ist>
-rw-r--r-- | changelog.d/5258.bugfix | 1 | ||||
-rw-r--r-- | synapse/rest/media/v1/thumbnail_resource.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/5258.bugfix b/changelog.d/5258.bugfix new file mode 100644 index 0000000000..fb5d44aedb --- /dev/null +++ b/changelog.d/5258.bugfix @@ -0,0 +1 @@ +Fix error when downloading thumbnail with missing width/height parameter. diff --git a/synapse/rest/media/v1/thumbnail_resource.py b/synapse/rest/media/v1/thumbnail_resource.py index 5305e9175f..35a750923b 100644 --- a/synapse/rest/media/v1/thumbnail_resource.py +++ b/synapse/rest/media/v1/thumbnail_resource.py @@ -56,8 +56,8 @@ class ThumbnailResource(Resource): def _async_render_GET(self, request): set_cors_headers(request) server_name, media_id, _ = parse_media_id(request) - width = parse_integer(request, "width") - height = parse_integer(request, "height") + 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") |