Skip to content

Skip malformed Content-Disposition parameters when parsing filenames#627

Merged
ryanfowler merged 1 commit into
mainfrom
fix-contentdisposition-parsing
May 27, 2026
Merged

Skip malformed Content-Disposition parameters when parsing filenames#627
ryanfowler merged 1 commit into
mainfrom
fix-contentdisposition-parsing

Conversation

@ryanfowler
Copy link
Copy Markdown
Owner

Summary

  • Ignore malformed Content-Disposition parameters instead of aborting filename parsing
  • Preserve valid filename= and filename*= values that appear after a bad parameter
  • Add a regression test for attachment; bad-param; filename="ok.txt"

Testing

  • cargo fmt
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo test --all-features

@ryanfowler ryanfowler enabled auto-merge May 27, 2026 19:10
@ryanfowler ryanfowler force-pushed the fix-contentdisposition-parsing branch from e754fac to 5269cbf Compare May 27, 2026 19:19
@ryanfowler ryanfowler merged commit 44a12cb into main May 27, 2026
4 checks passed
@ryanfowler ryanfowler deleted the fix-contentdisposition-parsing branch May 27, 2026 19:25
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