Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.4
-
None
-
None
Description
Certain strings can cause the org.apache.commons.io.FileUtils.toFile(URL url) method to call Integer.parseInt with an invalid argument and thus throw a NumberFormatException:
Exception in thread "main" java.lang.NumberFormatException: For input string: "%2"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at org.apache.commons.io.FileUtils.toFile(FileUtils.java:476)
One example of such a string: "both%20are%20100%20%25%20true"
Attachments
Issue Links
- duplicates
-
IO-166 Fix URL decoding in FileUtils.toFile()
- Closed