-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-10030: Sped up reading encrypted ZIP files by 2 times. #550
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
bpo-10030: Sped up reading encrypted ZIP files by 2 times. #550
Conversation
@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @gpshead, @loewis, @tiran, @freddrake and @ctismer to be potential reviewers. |
Not sure what @mention-bot is, but hopefully it's not using the NEWS file as a source for locating "potential reviewers". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tests?
@freddrake |
This change doesn't add new API and doesn't change behavior of public API. No new tests are needed. |
# zd = _ZipDecrypter(mypwd) | ||
# plain_bytes = zd(cypher_bytes) | ||
|
||
def _ZipDecrypter(pwd): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to rename the parameter to "password".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name "pwd" is used for parameters of public API. It would be better to keep it consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok, in this case it's fine :-)
|
||
# ZIP supports a password-based form of encryption. Even though known | ||
# plaintext attacks have been found against it, it is still useful | ||
# to be able to get data out of such a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it's worth it to add this warning, maybe just as a note, in zipfile documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zipfile
doesn't support creating encrypted ZIP archives. It just supports reading encrypted ZIP archives created by other programs. Thus this warning doesn't have relation to the use of the zipfile
module. It has relation to the cause why encrypting is not implemented. It is useful for zipfile
developers, not users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Anyway, it's unrelated to your change. I started a thread on security-SIG:
https://mail.python.org/pipermail/security-sig/2017-March/000238.html
Have I satisfied your request @briancurtin? If you meant some specific tests say what tests are needed. |
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.5.11 to 1.5.12. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-python@1.5.11...1.5.12) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mariatta Wijaya <[email protected]>
No description provided.