alhudz opened a new pull request, #475:
URL: https://github.com/apache/commons-fileupload/pull/475

   Repro: parse a `Content-Disposition` value of `form-data; name="f"; 
filename*=UTF-8''report%3` (a truncated RFC 5987 percent escape) and read the 
resulting file name.
   Expected: rejected, the same as `%GG` or a non-ASCII byte already are.
   Actual: `RFC2231Utils.decodeText` returns `report`; `fromHex` treats a `%` 
with fewer than two following characters as end-of-input and returns what it 
decoded so far, dropping the truncated escape.
   Fix: throw `IllegalArgumentException` on a truncated `%` escape, so the 
value is rejected like every other malformed input in `fromHex` and like the 
sibling `QuotedPrintableDecoder`. Covered by a new case in 
`RFC2231UtilityTestCase`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to