Skip to content

download: strip characters that misrepresent the filename - #231

Open
cgzones wants to merge 1 commit into
matze:masterfrom
cgzones:download-filename-spoofing
Open

cgzones wants to merge 1 commit into
matze:masterfrom
cgzones:download-filename-spoofing

Conversation

@cgzones

@cgzones cgzones commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

filename* percent-encodes every character of the title, and the client decodes that back before showing the name — so a title of "evil<U+202E>gnp.exe" was offered as "evil.exe.png", with the extension the user reads not the one the file has. Replace the bidirectional formatting characters and control characters before encoding.

`filename*` percent-encodes every character of the title, and the client
decodes that back before showing the name — so a title of
"evil<U+202E>gnp.exe" was offered as "evil.exe.png", with the extension the
user reads not the one the file has. Replace the bidirectional formatting
characters and control characters before encoding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant