summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-09-08 13:43:43 +0100
committerMark Haines <mark.haines@matrix.org>2016-09-08 13:43:43 +0100
commitfa9d36e050d942e76b2bd6a6d2c190215a1dac39 (patch)
tree806152a98d66013b94882c85cb1cb6129be62e78 /synapse/rest
parentAdd a new method to enqueue the device messages rather than sending a dummy EDU (diff)
parentLog delta files we're applying (diff)
downloadsynapse-fa9d36e050d942e76b2bd6a6d2c190215a1dac39.tar.xz
Merge branch 'develop' into markjh/direct_to_device_federation
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/media/v1/download_resource.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/download_resource.py b/synapse/rest/media/v1/download_resource.py
index 9f0625a822..a45ee9483e 100644
--- a/synapse/rest/media/v1/download_resource.py
+++ b/synapse/rest/media/v1/download_resource.py
@@ -45,7 +45,14 @@ class DownloadResource(Resource):
     @request_handler()
     @defer.inlineCallbacks
     def _async_render_GET(self, request):
-        request.setHeader("Content-Security-Policy", "sandbox")
+        request.setHeader(
+            "Content-Security-Policy",
+            "default-src 'none';"
+            " script-src 'none';"
+            " plugin-types application/pdf;"
+            " style-src 'unsafe-inline';"
+            " object-src 'self';"
+        )
         server_name, media_id, name = parse_media_id(request)
         if server_name == self.server_name:
             yield self._respond_local_file(request, media_id, name)