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

Change ZipOutputStream.PutNextEntry to explicity validate the requested compression method #422

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Feb 11, 2020

Equivalent of #421, but for ZipOutputStream.

I added this to throw NotImplementedException, and then wondered again if it should be that or NotSupportedException :-(.

PR Doesn't add a unit test as the CompressionMethod property setter on ZipEntry currently prevents it, so the only way to try it would be to use a ZipEntry with a different type from an existing file.

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.

Copy link
Member

@piksel piksel left a comment

Choose a reason for hiding this comment

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

As with the previous one, I think the important part is being consistent. Neither of the exceptions include our case in their scopes.

@piksel piksel merged commit 32920f9 into icsharpcode:master Jun 19, 2020
@Numpsy Numpsy deleted the rw/zos/verify_compression_method branch June 19, 2020 22:48
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