rwf2 / multer

An async parser for multipart/form-data content-type in Rust
MIT License
158 stars 37 forks source link

Supporting unquoted name and filename broke semicolons in filenames #44

Closed Follpvosten closed 2 years ago

Follpvosten commented 2 years ago

We rely on our customers uploading files with metadata in the filenames (please don't ask, yes we know this is a bad idea, yes we've considered all the other options). For separating different properties we decided on using ; because it's both very clear and supported in filenames on all major platforms.

I just tracked down a mysterious issue we were having while using async-graphql and it led me to this line https://github.com/rousan/multer-rs/blob/master/src/constants.rs#L38

It looks like in 677ce5cd1b2939d5aced78debd06932730efb19b, support for filenames with semicolons in them was completely broken, which means the file doesn't even get through to our code and early-fails with a mysterious, not even graphql compliant error (the latter is on async-graphql though).

It would be great if this could somehow be fixed - until then we have to rely on pinning an older version of multer (as this breaking change was released with the 2.0.3 release which only exists on crates.io).

SergioBenitez commented 2 years ago

Fix published in 2.0.4. Thank you for reporting this!