diff options
author | Affan Shaikhsurab <51104750+AffanShaikhsurab@users.noreply.github.com> | 2025-03-08 21:37:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-08 21:37:05 (GMT) |
commit | a3990df6121880e8c67824a101bb1316de232898 (patch) | |
tree | d4099e7b243cf4ab7030c6aa4116f7596c3c7522 /Python/codegen.c | |
parent | edd1eca336976b3431cf636aea87f08a40c94935 (diff) | |
download | cpython-a3990df6121880e8c67824a101bb1316de232898.zip cpython-a3990df6121880e8c67824a101bb1316de232898.tar.gz cpython-a3990df6121880e8c67824a101bb1316de232898.tar.bz2 |
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.
Diffstat (limited to 'Python/codegen.c')
0 files changed, 0 insertions, 0 deletions