Steuere das Herunterladen von Originalen je Rolle, benenne Dateien richtig und zeige HTML-Mails gesichert im Sandbox-Rahmen.
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 5m35s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 22s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
StommerandClaude Sonnet 5.5 committed 2026-10-22 14:22:35 +02:00
1 parent 0a5daf6713
commit 075525ee17
26 files changed
+494 -71

No files matched your search

+5 -1
View File
@@ -67,5 +67,9 @@ def display_filename(name: str) -> str:
def content_disposition(filename: str) -> str:
"""The real name goes along in UTF-8 (RFC 5987), with a plain ASCII fallback for old clients."""
from urllib.parse import quote
safe = display_filename(filename).replace('"', "")
return f'attachment; filename="{safe}"'
fallback = safe.encode("ascii", "replace").decode("ascii").replace("?", "_")
return f"attachment; filename=\"{fallback}\"; filename*=UTF-8''{quote(safe, safe='')}"