Bug JDK-8162624 recommended the removal of the libmagic-based file type detector on Linux.
This seems a serious regression. Analysis of file type based on content is very useful for white-listing uploaded files where you cannot trust the extension.
On Oracle Linux 6 Java 1.8 successfully recognizes (for example) JPEGs, PNGs and PDFs based on content alone.
Understand that not all platforms can behave in the same way but it seems better to do the most rather than the least on each platform.
This seems a serious regression. Analysis of file type based on content is very useful for white-listing uploaded files where you cannot trust the extension.
On Oracle Linux 6 Java 1.8 successfully recognizes (for example) JPEGs, PNGs and PDFs based on content alone.
Understand that not all platforms can behave in the same way but it seems better to do the most rather than the least on each platform.
- relates to
-
JDK-8162624 (fs) Remove FileTypeDetectors based on libgio and libmagic
-
- Closed
-