Class JarValidator


  • public class JarValidator
    extends java.lang.Object
    The class provides some methods to check validity of jar files.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void validateZipSlipSecure​(java.io.InputStream jarFileInputStream)
      Checks if the jar file is not malformed and thus is not zip slip vulnerable (doesn't have any entry name with traversal directory like "../file.dat")
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • validateZipSlipSecure

        public static void validateZipSlipSecure​(java.io.InputStream jarFileInputStream)
                                          throws java.io.IOException
        Checks if the jar file is not malformed and thus is not zip slip vulnerable (doesn't have any entry name with traversal directory like "../file.dat")
        Parameters:
        jarFileInputStream - jar file InputStream to check
        Throws:
        java.io.IOException