richardgirges / express-fileupload

Simple express file upload middleware that wraps around busboy
MIT License
1.53k stars 260 forks source link

Fix issue #342:URI malformed error. #356

Closed RomanBurunkov closed 1 year ago

RomanBurunkov commented 1 year ago

This PR fixes issue #342.

Unlike PR #343, this fix checks all of the not supported by the decodeURIComponent function characters.

uriDecodeFileName function now doesn't throw error when fileName param contains not supported by the decodeURIComponent characters.

Not supported characters will be removed from the result file name.

coveralls commented 1 year ago

Coverage Status

coverage: 94.704% (+0.2%) from 94.551% when pulling 2ba446a8b33861e2b33b29f72c915ecf6b924f40 on RomanBurunkov:master into ee8e711a4f5e9804d1f7bab24a7f80a41095bebe on richardgirges:master.

boly38 commented 1 year ago

Hey @RomanBurunkov :)

I haven't had time to go back to my PR but I am 100% aligned with your resumption of my suggestion

thank you very much for your fix 👍