Skip to content
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

fix zipSlip #2015

Merged
merged 1 commit into from
Feb 13, 2024
Merged

fix zipSlip #2015

merged 1 commit into from
Feb 13, 2024

Conversation

jukzi
Copy link
Contributor

@jukzi jukzi commented Feb 13, 2024

@jukzi jukzi merged commit 208f95f into eclipse-jdt:master Feb 13, 2024
9 checks passed
@sratz
Copy link
Contributor

sratz commented Mar 20, 2024

This causes

java.lang.IllegalArgumentException: Bad zip entry: overrides/..ROOT...override in C:\<snip>\plugins\org.eclipse.jem_2.1.0.v202307260438.jar
	at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:155)
	at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:276)
	at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:244)
	at org.eclipse.jdt.internal.core.JavaProject.getProjectCache(JavaProject.java:2396)
	at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:333)
	at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2808)
	at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2802)
	at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2820)
	at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2812)
	at org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1707)
	at org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1608)
	at org.eclipse.pde.internal.core.util.PDEJavaHelper.isOnClasspath(PDEJavaHelper.java:111)
	...

No idea what this file does, but it appears to have some use:
https://github.com/eclipse-jeetools/webtools.javaee/tree/master/plugins/org.eclipse.jem/overrides

.. per se is not dangerous. The .. should probably be ../ (or ..\), to prevent path traversal attacks.

@jukzi jukzi mentioned this pull request Mar 20, 2024
@jukzi jukzi deleted the zipSlip branch March 20, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants