Skip to content
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

parse_boundary does not support quoted strings #64

Open
Geal opened this issue Sep 17, 2024 · 0 comments
Open

parse_boundary does not support quoted strings #64

Geal opened this issue Sep 17, 2024 · 0 comments

Comments

@Geal
Copy link

Geal commented Sep 17, 2024

It is possible to get a header with this format: content-type: multipart/mixed;boundary="test";deferSpec=20220824
Specified as parameters in field values: https://httpwg.org/specs/rfc9110.html#rfc.section.5.6.6

The current code in parse boundary does not remove the quotes:

multer/src/lib.rs

Lines 178 to 180 in 09cc730

m.get_param(mime::BOUNDARY)
.map(|name| name.as_str().to_owned())
.ok_or(Error::NoBoundary)

So we get an incomplete multipart stream error because multer is looking for the boundary with quotes

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

No branches or pull requests

1 participant