From 4e5b938ebee3020ca91aba7a0e240bf4bd55ccd2 Mon Sep 17 00:00:00 2001 From: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:01:20 +0200 Subject: [PATCH] Flesh out CSP. --- authentik/brands/utils.py | 1 + authentik/core/templates/base/header_js.html | 2 +- authentik/core/templates/base/skeleton.html | 3 ++- authentik/core/templates/base/theme.html | 4 ++-- authentik/core/templates/login/base_full.html | 2 +- authentik/flows/templates/flows/frame-submit.html | 2 +- authentik/flows/templates/if/flow-sfe.html | 14 +++++++------- authentik/flows/templates/if/flow.html | 10 +++++----- web/src/admin/events/EventMap.ts | 4 ++-- web/src/flow/sources/apple/AppleLoginInit.ts | 1 + web/src/flow/sources/telegram/utils.ts | 2 ++ web/src/flow/stages/captcha/CaptchaStage.ts | 1 + 12 files changed, 26 insertions(+), 20 deletions(-) diff --git a/authentik/brands/utils.py b/authentik/brands/utils.py index 9b2b5be65c..2487653cb7 100644 --- a/authentik/brands/utils.py +++ b/authentik/brands/utils.py @@ -66,4 +66,5 @@ def context_processor(request: HttpRequest) -> dict[str, Any]: "footer_links": tenant.footer_links, "html_meta": {**get_http_meta()}, "version": authentik_full_version(), + "csp_nonce": request.request_id, } diff --git a/authentik/core/templates/base/header_js.html b/authentik/core/templates/base/header_js.html index 39dc374cf0..cc5b673258 100644 --- a/authentik/core/templates/base/header_js.html +++ b/authentik/core/templates/base/header_js.html @@ -1,7 +1,7 @@ {% load i18n %} {% get_current_language as LANGUAGE_CODE %} -