Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.12] gh-123726: Document caveats of zipfile.Path around name saniti…
…zation (GH-130537) (#130987) gh-123726: Document caveats of zipfile.Path around name sanitization (GH-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. (cherry picked from commit a3990df) Co-authored-by: Affan Shaikhsurab <[email protected]>
- Loading branch information