From 1b36253203ac66078c24528529eac7e2c5963da7 Mon Sep 17 00:00:00 2001 From: Jan Pecek Date: Sun, 15 Apr 2012 19:57:39 +0200 Subject: [PATCH] Improve X-Content-Security-Policy header to work in FF, Chrome and Opera; but loading version.js script is still disabled in main.php (due to https), BugID: 3426500 --- libraries/header_http.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/header_http.inc.php b/libraries/header_http.inc.php index 337fe4796a..9873c5dbdf 100644 --- a/libraries/header_http.inc.php +++ b/libraries/header_http.inc.php @@ -22,7 +22,8 @@ $GLOBALS['now'] = gmdate('D, d M Y H:i:s') . ' GMT'; /* 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 \'self\' data:; script-src \'self\' www.phpmyadmin.net'); + header('X-Content-Security-Policy: allow \'self\'; options inline-script eval-script; frame-ancestors \'self\'; img-src \'self\' data:; script-src \'self\' http://www.phpmyadmin.net'); + header('X-WebKit-CSP: default-src \'self\' \'unsafe-inline\'; img-src \'self\' data:; script-src \'self\' \'unsafe-inline\' \'unsafe-eval\' http://www.phpmyadmin.net'); } PMA_no_cache_header(); if (!defined('IS_TRANSFORMATION_WRAPPER')) {