From 9691360f6ec2224dd6508d32cc095e320bb27bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 27 Nov 2019 20:26:57 +0100 Subject: [PATCH] Allow inline styles for theming images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/theming/lib/Controller/ThemingController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index 25c2273279..34ea22207c 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -379,6 +379,9 @@ class ThemingController extends Controller { } $response = new FileDisplayResponse($file); + $csp = new Http\ContentSecurityPolicy(); + $csp->allowInlineStyle(); + $response->setContentSecurityPolicy($csp); $response->cacheFor(3600); $response->addHeader('Content-Type', $this->config->getAppValue($this->appName, $key . 'Mime', '')); $response->addHeader('Content-Disposition', 'attachment; filename="' . $key . '"');