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>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-08 17:40:15 +00:00
parent 351d6f3f4f
commit 883f123138
2 changed files with 7 additions and 4 deletions
+1
View File
@@ -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,