Title: [3.11] gh-103861: Fix Zip64 extensions not being properly applied in some cases (GH-103863) by gpshead · Pull Request #104534 · python/cpython · GitHub
Open Graph Title: [3.11] gh-103861: Fix Zip64 extensions not being properly applied in some cases (GH-103863) by gpshead · Pull Request #104534 · python/cpython
X Title: [3.11] gh-103861: Fix Zip64 extensions not being properly applied in some cases (GH-103863) by gpshead · Pull Request #104534 · python/cpython
Description: Fix Zip64 extensions not being properly applied in some cases: Fixes an issue where adding a small file to a ZipFile object while forcing zip64 extensions causes an extra Zip64 record to be added to the zip, but doesn't update the min_version or file sizes in the primary central directory header. Also fixed an edge case in checking if zip64 extensions are required: This fixes an issue where if data requiring zip64 extensions was added to an unseekable stream without specifying force_zip64=True, zip64 extensions would not be used and a RuntimeError would not be raised when closing the file (even though the size would be known at that point). This would result in successfully writing corrupt zip files. Deciding if zip64 extensions are required outside of the FileHeader function means that both FileHeader and _ZipWriteFile will always be in sync. Previously, the FileHeader function could enable zip64 extensions without propagating that decision to the _ZipWriteFile class, which would then not correctly write the data descriptor record or check for errors on close. If anyone is actually using ZipInfo.FileHeader as a public API without explicitly passing True or False in for zip64, their own code may still be susceptible to that kind of bug unless they make a similar change to where the zip64 decision happens. Fixes GH-103861 (cherry picked from commit 798bcaa)
Open Graph Description: Fix Zip64 extensions not being properly applied in some cases: Fixes an issue where adding a small file to a ZipFile object while forcing zip64 extensions causes an extra Zip64 record to be added t...
X Description: Fix Zip64 extensions not being properly applied in some cases: Fixes an issue where adding a small file to a ZipFile object while forcing zip64 extensions causes an extra Zip64 record to be added t...
Opengraph URL: https://github.com/python/cpython/pull/104534
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:b8be8e73-0058-44ff-e77c-f315599a44eb |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | D50C:80349:14FC30E:1C1444F:6969B718 |
| html-safe-nonce | 0c515d88672857c7cb2351d5c4c2874d39b096a0283bda7109ca43708af71f4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTBDOjgwMzQ5OjE0RkMzMEU6MUMxNDQ0Rjo2OTY5QjcxOCIsInZpc2l0b3JfaWQiOiI2NTg2OTUyMDQzOTgyODI1MjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 29b0cb22e53a1aae41f239ec78319296eb4ba8ff0c9badfe5de198f24de504d5 |
| hovercard-subject-tag | pull_request:1352001550 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/104534/checks |
| twitter:image | https://avatars.githubusercontent.com/u/68491?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/68491?s=400&v=4 |
| og:image:alt | Fix Zip64 extensions not being properly applied in some cases: Fixes an issue where adding a small file to a ZipFile object while forcing zip64 extensions causes an extra Zip64 record to be added t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width