-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem extracting zip file: illegal file name that breaks out of the target directory: / #400
Comments
It seems like fix for #133 in commit ff3d3b3 caused that problem.
new File("d:\test\2) --> d:\test In fix #133 you have added a file seperator to the extraction path in order somone can not extract in a different folder name. Unfortunatly the result of determineOutputFile does not contain a slash in case its the relative root folder.
|
@Gr33nbl00d Thanks for the PR. I merged your PR, but also made some slight adjustment to your PR. Instead of checking for just root directory, I now check if the outputFile is a directory, and append the fileSeparator if it is a directory. Can you please confirm if this change still works with your zip file? |
Fixed in v2.10.0 released today |
I will check on wednesday if it still works. I have a day off tomorrow. Thanks for merging |
Hi i have verified that the bugfix fixed the problem :) |
I think that #402 fixed a security vulnerability, is that indeed correct? If so, this should probably have a CVE assigned to it? Do you agree? |
Friendly ping to the Snky team:
|
Hi i have problem extracting a zip file which was generated by maven assembly plugin.
zip4j/src/main/java/net/lingala/zip4j/tasks/AbstractExtractFileTask.java
Line 53 in ed9eed5
I debuged into that place and found out that the outputfile does not have a trailing slash but the outputCannonical path variable has.
Thats what i see in the IDE
The zip file header looks like this:
Any solution to this? Is this a bug? Anyone had the same problem?
The text was updated successfully, but these errors were encountered: