From 883f1231387a511e046c56484961267e32517939 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 17:40:15 +0000 Subject: [PATCH] fix(security): add SRI to jQuery CDN, escape chat ID, use server-side hostname - Add integrity/crossorigin attributes to jQuery 3.6.0 CDN script - Use | int filter on zammad_chat_id to prevent XSS - Replace request.headers.get('host') with settings.external_hostname for canonical URL and Open Graph tags to prevent host-header injection Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- app/views/help.py | 1 + frontend/templates/help.html | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/help.py b/app/views/help.py index eff08b1b..9f3cc8fc 100644 --- a/app/views/help.py +++ b/app/views/help.py @@ -33,6 +33,7 @@ async def help_center(request: Request): "help.html", { "request": request, + "external_hostname": settings.external_hostname, "zammad_url": settings.zammad_url, "zammad_chat_enabled": settings.zammad_chat_enabled, "zammad_chat_id": settings.zammad_chat_id, diff --git a/frontend/templates/help.html b/frontend/templates/help.html index b96ea5f6..03bc64d5 100644 --- a/frontend/templates/help.html +++ b/frontend/templates/help.html @@ -6,13 +6,13 @@ - + - + +