-
- Downloads
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>
Showing
- changelog.d/11936.bugfix 1 addition, 0 deletionschangelog.d/11936.bugfix
- synapse/http/client.py 18 additions, 0 deletionssynapse/http/client.py
- synapse/rest/media/v1/preview_url_resource.py 8 additions, 0 deletionssynapse/rest/media/v1/preview_url_resource.py
- tests/rest/media/v1/test_url_preview.py 72 additions, 0 deletionstests/rest/media/v1/test_url_preview.py
Loading
Please register or sign in to comment