File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -745,8 +745,8 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
745745
746746 Never extract archives from untrusted sources without prior inspection.
747747 It is possible that files are created outside of the path specified in
748- the *extract_dir * argument, e.g. members that have absolute filenames
749- starting with "/" or filenames with two dots "..".
748+ the *extract_dir * argument, for example, members that have absolute filenames
749+ or filenames with ".." components .
750750
751751 Since Python 3.14, the defaults for both built-in formats (zip and tar
752752 files) will prevent the most dangerous of such security issues,
Original file line number Diff line number Diff line change @@ -414,9 +414,9 @@ ZipFile objects
414414 .. warning ::
415415
416416 Never extract archives from untrusted sources without prior inspection.
417- It is possible that files are created outside of *path *, e.g. members
418- that have absolute filenames starting with `` "/" `` or filenames with two
419- dots `` ".." ``. This module attempts to prevent that.
417+ It is possible that files are created outside of *path *, for example, members
418+ that have absolute filenames or filenames with ".." components.
419+ This module attempts to prevent that.
420420 See :meth: `extract ` note.
421421
422422 .. versionchanged :: 3.6
@@ -593,7 +593,7 @@ Path objects
593593 The :class: `Path ` class does not sanitize filenames within the ZIP archive. Unlike
594594 the :meth: `ZipFile.extract ` and :meth: `ZipFile.extractall ` methods, it is the
595595 caller's responsibility to validate or sanitize filenames to prevent path traversal
596- vulnerabilities (e.g., filenames containing ".." or absolute paths ). When handling
596+ vulnerabilities (for example, absolute paths or paths with ".." components ). When handling
597597 untrusted archives, consider resolving filenames using :func: `os.path.abspath `
598598 and checking against the target directory with :func: `os.path.commonpath `.
599599
You can’t perform that action at this time.
0 commit comments