Skip to content

parse_boundary does not support quoted strings #64

@Geal

Description

@Geal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions