From 612598fe7fbc6c6cf6305a798e9b48b435ea7a91 Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Fri, 4 Mar 2011 23:06:49 +0100 Subject: [PATCH] Fix CSP header: * add 'self' for img-src and script-src * version.js access: - remove protocol (shorter and useful mainly when HTTPS is required) - remove path (invalid syntax, only hosts are allowed there) --- libraries/header_http.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/header_http.inc.php b/libraries/header_http.inc.php index f7c27b23aa7c..9ad890dba9c0 100644 --- a/libraries/header_http.inc.php +++ b/libraries/header_http.inc.php @@ -22,7 +22,7 @@ /* Prevent against ClickJacking by allowing frames only from same origin */ if (!$GLOBALS['cfg']['AllowThirdPartyFraming']) { header('X-Frame-Options: SAMEORIGIN'); - header('X-Content-Security-Policy: allow \'self\'; options inline-script eval-script; frame-ancestors \'self\'; img-src data:; script-src http://www.phpmyadmin.net/home_page/version.js'); + header('X-Content-Security-Policy: allow \'self\'; options inline-script eval-script; frame-ancestors \'self\'; img-src \'self\' data:; script-src \'self\' www.phpmyadmin.net'); } header('Expires: ' . $GLOBALS['now']); // rfc2616 - Section 14.21 header('Last-Modified: ' . $GLOBALS['now']);