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

Restrict path traversal on TarArchive extraction #519

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Oct 7, 2020

Prevents files from being written outside of the destination directory when extracted using TarArchive.ExtractContents.
Basically the Tar version of #235

Attempting to extract a file that has a path traversing outside of the destinationDirectory will throw and InvalidNameException unless explicitly overridden:

tarArchive.ExtractContents(destinationDirectory, allowParentTraversal: true);

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

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.

1 participant