-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
zipfile.Path regression #123270
Copy link
Copy link
Closed
jaraco/zipp
#124Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue
Projects
Status
Done
Bug report
Bug description:
#122906 introduced a regression with directories that look like Windows drive letters (on Linux):
This is the result of
_sanitize()unconditionally treating a directory that looks like a drive letter as such and removing the colon, regardless of operating system:cpython/Lib/zipfile/_path/__init__.py
Line 141 in 58fdb16
Whereas
_extract_member()usesos.path.splitdrive()(which is a no-op on Linux):cpython/Lib/zipfile/__init__.py
Line 1807 in 58fdb16
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs