Skip to content

Conversation

@piksel
Copy link
Member

@piksel piksel commented Jun 17, 2018

Prevents files from being written outside of target directory when invoked from FastZip.ExtractZip().

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

new FastZip().ExtractZip(archive, targetDirectory, FastZip.Overwrite.Never,
 null, "", "", true, 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.

piksel added 2 commits June 17, 2018 15:03
Use new parameter allowParentTraversal to re-enable past behaviour
Added new explicit exception for invalid names
Fixes icsharpcode#232
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