From 8b66da259fa99464f31f32a0ac151c9b8874c5dc Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Wed, 11 Nov 2026 12:54:35 +0100 Subject: [PATCH] Read CSP nonce from cspScriptNonce, fall back to cspNonce CakePHP's CspMiddleware stores the script nonce in the cspScriptNonce request attribute and never sets cspNonce. The admin layout and the stats page only read cspNonce, so with the core middleware their inline scripts were blocked. The CDN scripts (Chart.js, flatpickr, Bootstrap) had no nonce at all, and inline styles and CDN stylesheets now carry cspStyleNonce. --- templates/Admin/QueuedJobs/heatmap.php | 3 +- templates/Admin/QueuedJobs/stats.php | 2 +- templates/layout/queue.php | 21 +++--- .../Admin/QueuedJobsControllerTest.php | 72 +++++++++++++++++++ 4 files changed, 87 insertions(+), 11 deletions(-) diff --git a/templates/Admin/QueuedJobs/heatmap.php b/templates/Admin/QueuedJobs/heatmap.php index f0983a91..103bfa25 100644 --- a/templates/Admin/QueuedJobs/heatmap.php +++ b/templates/Admin/QueuedJobs/heatmap.php @@ -214,7 +214,8 @@ -