From: Jakub Vrana Date: Sat, 13 Jan 2018 13:21:54 +0000 (+0100) Subject: Do not send empty CSP X-Git-Tag: v4.4.0~23 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=b7fcebfba80bd894a27d1d95eabb6ca95acf3f94;p=adminer.git Do not send empty CSP --- diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 705e101a..ad79bd69 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -97,7 +97,9 @@ function page_headers() { foreach ($adminer->csp() as $key => $val) { $csp[] = "$key $val"; } - header("Content-Security-Policy: " . implode("; ", $csp)); + if ($csp) { + header("Content-Security-Policy: " . implode("; ", $csp)); + } $adminer->headers(); }