Class SafeZipEntry

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class SafeZipEntry
    extends java.util.zip.ZipEntry
    SafeZipEntry class that prevents Zip Slip vulnerability by disallowing ZipEntries with names that target outside directory, eg. ../foo.txt. In such cases com.hybris.cockpitng.util.zip.UnsupportedZipEntryException is thrown.
    • Constructor Summary

      Constructors 
      Constructor Description
      SafeZipEntry​(java.lang.String name)  
      SafeZipEntry​(java.util.zip.ZipEntry e)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()  
      • Methods inherited from class java.util.zip.ZipEntry

        clone, getComment, getCompressedSize, getCrc, getCreationTime, getExtra, getLastAccessTime, getLastModifiedTime, getMethod, getSize, getTime, getTimeLocal, hashCode, isDirectory, setComment, setCompressedSize, setCrc, setCreationTime, setExtra, setLastAccessTime, setLastModifiedTime, setMethod, setSize, setTime, setTimeLocal, toString
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, notify, notifyAll, wait, wait, wait