mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 16:13:15 +00:00
GetFile answered on the webmail origin with the Content-Type stored in the WOPI token, which for a mail attachment comes straight from the launch request and for a Files node is a user-settable property. No CSP, nosniff or disposition was added, since `/api/*` skips the proxy. A user could mint a token for their own blob typed `text/html` and have a victim open the GetFile URL, running script in the webmail origin. GetFile now always sends `application/octet-stream` with `Content-Disposition: attachment`, `nosniff` and a sandboxing CSP, and refuses browser loads (any `Sec-Fetch-Dest` other than `empty`). The editor fetches it server-to-server, so it is unaffected.