diff --git a/changelog.d/4284.bugfix b/changelog.d/4284.bugfix new file mode 100644 index 000000000..4a9478fa2 --- /dev/null +++ b/changelog.d/4284.bugfix @@ -0,0 +1 @@ +Add 'sandbox' to CSP for media reprository diff --git a/synapse/rest/media/v1/download_resource.py b/synapse/rest/media/v1/download_resource.py index f911b120b..bdc5daecc 100644 --- a/synapse/rest/media/v1/download_resource.py +++ b/synapse/rest/media/v1/download_resource.py @@ -48,7 +48,8 @@ class DownloadResource(Resource): set_cors_headers(request) request.setHeader( b"Content-Security-Policy", - b"default-src 'none';" + b"sandbox;" + b" default-src 'none';" b" script-src 'none';" b" plugin-types application/pdf;" b" style-src 'unsafe-inline';"