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

Check that extracting extension jar doesn't escape designated directory #7908

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Feb 24, 2023

Mostly to appease code scanners.

@laurit laurit requested a review from a team as a code owner February 24, 2023 17:55
.toPath()
.startsWith(tempDirectory.getCanonicalFile().toPath())) {
throw new IllegalStateException("Invalid extension " + name);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow, you can have relative ".." paths inside of a jar which escape the directory you are unjar-ing to? is there a simple link to this kind of issue that might make a helpful comment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laurit laurit merged commit 4686138 into open-telemetry:main Mar 7, 2023
@laurit laurit deleted the zip-slip branch March 7, 2023 07:01
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.

None yet

2 participants