Skip to content

download file parse filename add RFC 5987 support #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 18, 2025

Conversation

zuisong
Copy link
Contributor

@zuisong zuisong commented Apr 10, 2025

support percent-encoded filename

close #415

@zuisong zuisong changed the title download file parse filename according to RFC 5987 download file parse filename add RFC 5987 support Apr 10, 2025
@zuisong zuisong marked this pull request as draft April 10, 2025 04:38
support percent-encoded filename

Signed-off-by: zuisong <[email protected]>
@zuisong zuisong marked this pull request as ready for review April 10, 2025 05:29
@zuisong zuisong force-pushed the parse-filename branch 2 times, most recently from d282abe to 3f5de8e Compare April 10, 2025 05:57
Sanitizes filenames by removing or replacing potentially problematic characters
Makes filenames safe for cross-platform use
Prevents directory traversal attacks (e.g., "../../../")
Copy link
Collaborator

@blyxxyz blyxxyz left a comment

Choose a reason for hiding this comment

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

Nice!

@zuisong
Copy link
Contributor Author

zuisong commented Apr 14, 2025

😁 Thanks, I've incorporated all your suggested improvements.

Copy link
Collaborator

@blyxxyz blyxxyz left a comment

Choose a reason for hiding this comment

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

Works great! sanitize-filename is also a good addition.

One more tweak and then I think this is ready.

@ducaale ducaale merged commit 55b920e into ducaale:master Apr 18, 2025
9 checks passed
@zuisong zuisong deleted the parse-filename branch April 19, 2025 15:45
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.

filename for utf8 content-disposition is not correct
3 participants