add unsafe-inline to csp rule, because of jquery 3.6.1

This commit is contained in:
Uwe Steinmann 2022-11-24 11:01:14 +01:00
parent 63ca342576
commit 7854f75c8c

View File

@ -57,9 +57,11 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
* X-Content-Security-Policy is deprecated, Firefox understands * X-Content-Security-Policy is deprecated, Firefox understands
* Content-Security-Policy since version 23+ * Content-Security-Policy since version 23+
* 'worker-src blob:' is needed for cytoscape * 'worker-src blob:' is needed for cytoscape
* 'unsafe-inline' is needed for jquery 3.6.1 when loading the remote
* content of a modal box
*/ */
$csp_rules = []; $csp_rules = [];
$csp_rule = "script-src 'self' 'unsafe-eval'"; $csp_rule = "script-src 'self' 'unsafe-eval' 'unsafe-inline'";
if($this->nonces) { if($this->nonces) {
$csp_rule .= " 'nonce-".implode("' 'nonce-", $this->nonces)."'"; $csp_rule .= " 'nonce-".implode("' 'nonce-", $this->nonces)."'";
} }