Skip to content

Always UTF-8 encode filename parameter in Content-Disposition header#158

Closed
michael-o wants to merge 1 commit intomasterfrom
encode-filename
Closed

Always UTF-8 encode filename parameter in Content-Disposition header#158
michael-o wants to merge 1 commit intomasterfrom
encode-filename

Conversation

@michael-o
Copy link
Copy Markdown
Member

@michael-o michael-o commented Feb 25, 2022

Since we don't know that passed filename will or will not contain ASCII-only
chartacters it is the safest approach to always encode the filename.

This closes #158

@ams-tschoening
Copy link
Copy Markdown
Contributor

While this looks good to me, how does it close #155 and the wrongly used HTML-escape? Looks like two different aspects of the problem to me. Forwarding HTML-escapes is still wrong.

@michael-o
Copy link
Copy Markdown
Member Author

While this looks good to me, how does it close #155 and the wrongly used HTML-escape? Looks like two different aspects of the problem to me. Forwarding HTML-escapes is still wrong.

This is a miswrite. It does not address #155 and never intended. This is a bug I found along.

Since we don't know that passed filename will or will not contain ASCII-only
chartacters it is the safest approach to always encode the filename.

This closes #158
Copy link
Copy Markdown
Member

@k10blogger k10blogger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@michael-o michael-o closed this in 98f2688 Feb 28, 2022
@michael-o michael-o deleted the encode-filename branch March 14, 2022 10:16
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.

3 participants