fix(media): allow HTML file uploads as downloadable attachments - #3597
Open
Chessing234 wants to merge 1 commit into
Open
fix(media): allow HTML file uploads as downloadable attachments#3597Chessing234 wants to merge 1 commit into
Chessing234 wants to merge 1 commit into
Conversation
Agents commonly produce HTML reports; the generic file path already serves them with attachment + nosniff + CSP. Drop text/html and xhtml from the deny lists (keep SVG/JS/executables blocked) and pin the download path with regression tests. Signed-off-by: Taksh <takshkothari09@gmail.com>
Contributor
Author
|
@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance? |
Chessing234
force-pushed
the
fix/allow-html-file-uploads
branch
from
August 5, 2026 10:37
7898b22 to
f160f79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text/htmlandapplication/xhtml+xmlfrom the relay and desktop generic-file deny lists.html/.xhtmlextension and assertserve_inlinestays false (forced download)Generic files are already served with
Content-Disposition: attachment,X-Content-Type-Options: nosniff, andCSP: default-src 'none', so HTML documents are safe as downloadable attachments (#3453).Test plan
cargo test -p buzz-media --lib test_validate_file_html.htmlreport in Desktop — succeeds and downloads rather than rendering inline.exeuploads still rejectedFixes #3453
Made with Cursor