Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
1.0
-
None
-
None
-
Unknown
-
Description
The current code is way too fragile and end up in an infinite loop in 10.3 (which have a difference version of commons-compress that the one used when the filter was written) because it's logging error instead of failing right away way getNextEntry() fails. Also it should try to find the type of the file before actually read it, current it try to read it as a zip directly and expect the first read to fail if it's not one basically (unfortunately it's not exactly working that way anymore).
Ideally some library which deal with "extract any kind of archive input stream" should be used but if it's not possible the safest would probably to use something like Tika to find the mime type and have a component for each mime type, that way at worst you will get an error because the archive type is not supported and you can use another one.
Attachments
Issue Links
- relates to
-
XCOMMONS-1437 FileUtils.copyToFile(InputStream source, File destination) is closing the input stream
- Closed