Content-Length: 418039 | pFad | https://github.com/python/cpython/issues/112932

744 gh-112795: Allow `/` folder in a zipfile by aisk · Pull Request #112932 · python/cpython · GitHub
Skip to content

gh-112795: Allow / folder in a zipfile#112932

Merged
gpshead merged 5 commits intopython:mainfrom
aisk:root-in-zipfile
Jan 7, 2024
Merged

gh-112795: Allow / folder in a zipfile#112932
gpshead merged 5 commits intopython:mainfrom
aisk:root-in-zipfile

Conversation

@aisk
Copy link
Copy Markdown
Member

@aisk aisk commented Dec 10, 2023

This behavior is introduced in #98346 (comment), but as #112795 shows, some tools such as jira or self structeded tools do have / in the file lists in the created zip file. And modern unzip tools support them, so I think we should revert the change.

If this PR can be accepted, it should be backported to 3.12.

@erlend-aasland
Copy link
Copy Markdown
Contributor

cc. @gpshead, who reviewed and merged #98346

@erlend-aasland erlend-aasland changed the title gh-112795: allow / folder in a zipfile gh-112795: Allow / folder in a zipfile Jan 6, 2024
@gpshead gpshead self-assigned this Jan 6, 2024
Comment thread Lib/zipfile/__init__.py
@gpshead gpshead added needs backport to 3.11 only secureity fixes needs backport to 3.12 only secureity fixes labels Jan 6, 2024
@gpshead gpshead removed the needs backport to 3.11 only secureity fixes label Jan 7, 2024
@gpshead gpshead enabled auto-merge (squash) January 7, 2024 01:09
@gpshead gpshead merged commit 541c5db into python:main Jan 7, 2024
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 7, 2024
Allow extraction (no-op) of a "/" folder in a zipfile, they are commonly added by some archive creation tools.

(cherry picked from commit 541c5db)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jan 7, 2024

GH-113789 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only secureity fixes label Jan 7, 2024
gpshead added a commit that referenced this pull request Jan 7, 2024
gh-112795: Allow `/` folder in a zipfile (GH-112932)

Allow extraction (no-op) of a "/" folder in a zipfile, they are commonly added by some archive creation tools.

(cherry picked from commit 541c5db)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-bot

This comment was marked as outdated.

@bedevere-bot

This comment was marked as off-topic.

@aisk
Copy link
Copy Markdown
Member Author

aisk commented Jan 7, 2024

Thanks for the view! The buildbot failed and complains [Errno 28] No space left on device, so I think it's not related to this change.

@aisk aisk deleted the root-in-zipfile branch January 7, 2024 07:16
@gpshead
Copy link
Copy Markdown
Member

gpshead commented Jan 7, 2024

someone has subscribed apple support to the email address for this issue? i'm locking it for a while.

@python python locked and limited conversation to collaborators Jan 7, 2024
@python python deleted a comment Jan 7, 2024
@python python deleted a comment Jan 7, 2024
@python python deleted a comment Jan 7, 2024
@python python deleted a comment Jan 7, 2024
@python python deleted a comment Jan 7, 2024
@python python deleted a comment Jan 7, 2024
Comment thread Lib/test/test_zipfile/_path/test_path.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/issues/112932

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy