File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -749,8 +749,8 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
749749
750750 Never extract archives from untrusted sources without prior inspection.
751751 It is possible that files are created outside of the path specified in
752- the *extract_dir * argument, e.g. members that have absolute filenames
753- starting with "/" or filenames with two dots "..".
752+ the *extract_dir * argument, for example, members that have absolute filenames
753+ or filenames with ".." components .
754754
755755 Since Python 3.14, the defaults for both built-in formats (zip and tar
756756 files) will prevent the most dangerous of such security issues,
Original file line number Diff line number Diff line change @@ -411,9 +411,9 @@ ZipFile objects
411411 .. warning ::
412412
413413 Never extract archives from untrusted sources without prior inspection.
414- It is possible that files are created outside of *path *, e.g. members
415- that have absolute filenames starting with `` "/" `` or filenames with two
416- dots `` ".." ``. This module attempts to prevent that.
414+ It is possible that files are created outside of *path *, for example, members
415+ that have absolute filenames or filenames with ".." components.
416+ This module attempts to prevent that.
417417 See :meth: `extract ` note.
418418
419419 .. versionchanged :: 3.6
@@ -590,7 +590,7 @@ Path objects
590590 The :class: `Path ` class does not sanitize filenames within the ZIP archive. Unlike
591591 the :meth: `ZipFile.extract ` and :meth: `ZipFile.extractall ` methods, it is the
592592 caller's responsibility to validate or sanitize filenames to prevent path traversal
593- vulnerabilities (e.g., filenames containing ".." or absolute paths ). When handling
593+ vulnerabilities (for example, absolute paths or paths with ".." components ). When handling
594594 untrusted archives, consider resolving filenames using :func: `os.path.abspath `
595595 and checking against the target directory with :func: `os.path.commonpath `.
596596
You can’t perform that action at this time.
0 commit comments