SIGN IN SIGN UP

gh-123726: Document caveats of zipfile.Path around name sanitization (#130537)

Add a note to the `zipfile.Path` class documentation clarifying that it does not sanitize filenames. This emphasizes the caller's responsibility to validate or sanitize inputs, especially when handling untrusted ZIP archives, to prevent path traversal vulnerabilities. The note also references the `extract` and `extractall` methods for comparison and suggests using `os.path.abspath` and `os.path.commonpath` for safe filename resolution.
A
Affan Shaikhsurab committed
a3990df6121880e8c67824a101bb1316de232898
Parent: edd1eca
Committed by GitHub <noreply@github.com> on 3/8/2025, 9:37:05 PM