zeroturnaround / zt-zip

ZeroTurnaround ZIP Library
http://www.zeroturnaround.com/
Apache License 2.0
1.38k stars 252 forks source link

Serious Bug : Error in Opening Zip File , org.zeroturnaround.zip.ZipException #128

Open goxr3plus opened 4 years ago

goxr3plus commented 4 years ago

I am having the following zip file which is a valid not corrupted zip file and can be opened with zip explorer on windows or 7zip .

Deposit1571307514.zip

But when i try your library to unpack it i am getting the following error : I will remove it from our dependencies because it had cause an issue in production . What can be the cause :) ?

org.zeroturnaround.zip.ZipException: java.util.zip.ZipException: error in opening zip file
    at org.zeroturnaround.zip.ZipExceptionUtil.rethrow(ZipExceptionUtil.java:11)
    at org.zeroturnaround.zip.ZipUtil.iterate(ZipUtil.java:522)
    at org.zeroturnaround.zip.ZipUtil.iterate(ZipUtil.java:472)
    at org.zeroturnaround.zip.ZipUtil.unpack(ZipUtil.java:996)
    at org.zeroturnaround.zip.ZipUtil.unpack(ZipUtil.java:939)
goxr3plus commented 4 years ago

@toomasr Tomas please let me know :)

toomasr commented 4 years ago

Quick check on my Mac shows:

╭─toomasr@deadlift ~/Downloads ╰─$ unzip -t Deposit1571307514.zip Archive: Deposit1571307514.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of Deposit1571307514.zip or Deposit1571307514.zip.zip, and cannot find Deposit1571307514.zip.ZIP, period.

Is this part of a multipart zip file?

goxr3plus commented 4 years ago

Probably , i tried also with zip4j and it reported missing zip headers .

I think the .zip is either corrupted or not created correctly , just wanted to report .

I go it from a client using our endpoint with the .zip he created .