From fb0ca5c4c8127cfec171b7333497e9fd01040cc2 Mon Sep 17 00:00:00 2001 From: hiteshjambhale <161462985+hiteshjambhale@users.noreply.github.com> Date: Mon, 7 Sep 2026 16:44:38 +0530 Subject: [PATCH] feat: Use per-request nonce in CSP to remove 'unsafe-inline' / 'unsafe-eval' (#10308) Harden the default Content-Security-Policy so inline scripts run only via a per-request nonce instead of a blanket 'unsafe-inline', and drop 'unsafe-eval'. - Generate a per-request nonce (secrets.token_urlsafe) cached on flask.g so the exact same value is emitted in templates and the CSP response header. - Substitute a {nonce} placeholder in CONTENT_SECURITY_POLICY at runtime. - Tag inline - - - - - - - + + + + + - {% if is_desktop_mode and is_linux %} - {% endif %} diff --git a/web/pgadmin/tools/erd/templates/erd/index.html b/web/pgadmin/tools/erd/templates/erd/index.html index 363986e41..8597651aa 100644 --- a/web/pgadmin/tools/erd/templates/erd/index.html +++ b/web/pgadmin/tools/erd/templates/erd/index.html @@ -5,7 +5,7 @@ {% endblock %} {% block body %} -