synapse-product/tests/rest/media/v1
Denis Kasak 337f38cac3
Implement a content type allow list for URL previews (#11936)
This implements an allow list for content types for which Synapse will attempt URL preview. If a URL resolves to a resource with a content type which isn't in the list, the download will terminate immediately.

This makes sense given that Synapse would never successfully generate a URL preview for such files in the first place, and helps prevent issues with streaming media servers, such as #8302.

Signed-off-by: Denis Kasak dkasak@termina.org.uk
2022-02-10 15:43:01 +00:00
..
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_base.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_filepath.py Fix media repository failing when media store path contains symlinks (#11446) 2021-12-02 16:05:24 +00:00
test_html_preview.py Support rendering previews with data: URLs in them (#11767) 2022-01-24 08:58:18 -05:00
test_media_storage.py Handle missing Content-Type header when accessing remote media (#11200) 2021-11-01 10:26:02 -07:00
test_oembed.py Be more lenient when parsing the version for oEmbed responses. (#11065) 2021-10-13 07:00:07 -04:00
test_url_preview.py Implement a content type allow list for URL previews (#11936) 2022-02-10 15:43:01 +00:00