multer icon indicating copy to clipboard operation
multer copied to clipboard

Multer skips the request, when boundary contains an equal sign "="

Open tanakom-truevoice opened this issue 2 years ago • 2 comments

https://github.com/expressjs/multer/blob/dd3ecef8dcac79568b96313dca00adad7563b45d/lib/make-middleware.js#L18

type-is use media-typer which treats the equal sign "=" as a separator (RFC 2616 sec 3.7). However, in the RFC 2046 Page 21 the boundary value is allows to use the equal sign "=".

So, when the boundary contains the equal sign "=", Multer will always skip the request.

tanakom-truevoice avatar Nov 25 '21 03:11 tanakom-truevoice

The sample of boundary that is not working is

'multipart/form-data; boundary=yradnuoB=_00102021041678916.vgthbatel-03abc.xyz'

tanakom-truevoice avatar Nov 25 '21 03:11 tanakom-truevoice

Have you tried putting your boundary value inside quotes?

E. g. 'multipart/form-data; boundary="yradnuoB=_00102021041678916.vgthbatel-03abc.xyz"' Other than that, see RFC 2049 for an example of nested "multipart" entities.

I'd also assume your nested multipart entity would require to use a different boundary delimiter, so I'm not sure if this is a bug or just a mere misunderstanding..

hakudev avatar Nov 29 '21 20:11 hakudev