anonymousland-synapse/synapse/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 Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
_base.py Prevent the media store from writing outside of the configured directory 2021-11-19 13:39:15 +00:00
config_resource.py Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
download_resource.py Add reactor to SynapseRequest and fix up types. (#10868) 2021-09-24 11:01:25 +01:00
filepath.py Fix media repository failing when media store path contains symlinks (#11446) 2021-12-02 16:05:24 +00:00
media_repository.py Convert all namedtuples to attrs. (#11665) 2021-12-30 18:47:12 +00:00
media_storage.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
oembed.py Fix preview of imgur and Tenor URLs. (#11669) 2022-01-18 13:20:24 -05:00
preview_html.py Support rendering previews with data: URLs in them (#11767) 2022-01-24 08:58:18 -05:00
preview_url_resource.py Implement a content type allow list for URL previews (#11936) 2022-02-10 15:43:01 +00:00
storage_provider.py Avoid storing URL cache files in storage providers (#10911) 2021-09-27 12:55:27 +01:00
thumbnail_resource.py Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
thumbnailer.py Fix error in thumbnail generation (#11288) 2021-11-10 20:49:43 +00:00
upload_resource.py Pass the proper type when uploading files. (#11927) 2022-02-07 10:06:52 -05:00