juxt / yada

A powerful Clojure web library, full HTTP, full async - see https://juxt.pro/yada/index.html
MIT License
735 stars 97 forks source link

Fix bug in the parsing of multipart headers. #306

Open primaljax opened 5 years ago

primaljax commented 5 years ago

When processing multipart headers, the intent is to split the header name from the value; however, if the value also contains a colon character, anything after the colon is lost. This issue specifically arises when Internet Explorer provides the entire path as the filename in the content-disposition header (e.g. "C:\file.txt").

This PR fixes the issue by limiting the split to the 1st colon character.

danielcompton commented 5 years ago

Would you be able to add some tests for this change?

primaljax commented 5 years ago

Sure. Working on some tests now.