René's URL Explorer Experiment


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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b2af034f-a6f4-ad41-ab0c-b01760cdce74
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAFCC:260922:C81C4B:10BA67C:69699989
html-safe-nonce893ad5a2ffba72df9c2d55cf1c7364b5f27d4fd42c7149eaa88c6165623ab987
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkNDOjI2MDkyMjpDODFDNEI6MTBCQTY3Qzo2OTY5OTk4OSIsInZpc2l0b3JfaWQiOiI3ODc1MDM5ODEyNzkwMDk4MzEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac194caea8b6bd983d581a8e34fb46495da76deeccf8bfd4f8467e7ad9b4b2b768
hovercard-subject-tagpull_request:1352001550
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/104534/files
twitter:imagehttps://avatars.githubusercontent.com/u/68491?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/68491?s=400&v=4
og:image:altFix 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseaf80af7cc9e3de9c336f18b208a600950a3c187c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/104534/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104534%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104534%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/104534/files
Reloadhttps://github.com/python/cpython/pull/104534/files
Reloadhttps://github.com/python/cpython/pull/104534/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/104534/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/104534/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
gpsheadhttps://github.com/gpshead
python:3.11https://github.com/python/cpython/tree/3.11
gpshead:backport-798bcaa-3.11https://github.com/gpshead/cpython/tree/backport-798bcaa-3.11
Conversation 0 https://github.com/python/cpython/pull/104534
Commits 1 https://github.com/python/cpython/pull/104534/commits
Checks 0 https://github.com/python/cpython/pull/104534/checks
Files changed https://github.com/python/cpython/pull/104534/files
Please reload this pagehttps://github.com/python/cpython/pull/104534/files
[3.11] gh-103861: Fix Zip64 extensions not being properly applied in some cases (GH-103863) https://github.com/python/cpython/pull/104534/files#top
Show all changes 1 commit https://github.com/python/cpython/pull/104534/files
f09ad48 [3.11] gh-103861: Fix Zip64 extensions not being properly applied in … pR0Ps May 16, 2023 https://github.com/python/cpython/pull/104534/commits/f09ad480dc86df50896ed47fb5f24cc0654cd56c
Clear filters https://github.com/python/cpython/pull/104534/files
Please reload this pagehttps://github.com/python/cpython/pull/104534/files
Please reload this pagehttps://github.com/python/cpython/pull/104534/files
test_zipfile.py https://github.com/python/cpython/pull/104534/files#diff-88215aededc3f81c55ba2432fe67617be9fc3faff9cb10e0c01f710adfcba426
zipfile.py https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
2023-04-25-19-58-13.gh-issue-103861.JeozgD.rst https://github.com/python/cpython/pull/104534/files#diff-4f8286ad0a767c4d65cb16046459ac923744cef93147b299f3fe260bcf9bc30a
Lib/test/test_zipfile.pyhttps://github.com/python/cpython/pull/104534/files#diff-88215aededc3f81c55ba2432fe67617be9fc3faff9cb10e0c01f710adfcba426
View file https://github.com/gpshead/cpython/blob/f09ad480dc86df50896ed47fb5f24cc0654cd56c/Lib/test/test_zipfile.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/104534/{{ revealButtonHref }}
https://github.com/python/cpython/pull/104534/files#diff-88215aededc3f81c55ba2432fe67617be9fc3faff9cb10e0c01f710adfcba426
https://github.com/python/cpython/pull/104534/files#diff-88215aededc3f81c55ba2432fe67617be9fc3faff9cb10e0c01f710adfcba426
Lib/zipfile.pyhttps://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
View file https://github.com/gpshead/cpython/blob/f09ad480dc86df50896ed47fb5f24cc0654cd56c/Lib/zipfile.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/104534/{{ revealButtonHref }}
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
https://github.com/python/cpython/pull/104534/files#diff-b5cf7374d79aae191c1e38d0959527e0bbb7a95e0df5b125a8b1056cc2c54851
Misc/NEWS.d/next/Library/2023-04-25-19-58-13.gh-issue-103861.JeozgD.rsthttps://github.com/python/cpython/pull/104534/files#diff-4f8286ad0a767c4d65cb16046459ac923744cef93147b299f3fe260bcf9bc30a
View file https://github.com/gpshead/cpython/blob/f09ad480dc86df50896ed47fb5f24cc0654cd56c/Misc/NEWS.d/next/Library/2023-04-25-19-58-13.gh-issue-103861.JeozgD.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/104534/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.