mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 08:13:50 +00:00
The header open-in-new-tab button opened the blob: URL as a top-level navigation for any preview that produced an objectUrl, including HTML and SVG attachments. Blob URLs inherit our origin, so a script-bearing attachment (text/html, image/svg+xml, ...) would execute in-origin when opened that way - the exact case isMimeTypeSafeForInlinePreview() already guards. Gate the button on that helper so it only appears for inert types (images except SVG, audio, video, PDF, text/plain).