File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -728,8 +728,8 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
728728
729729 Never extract archives from untrusted sources without prior inspection.
730730 It is possible that files are created outside of the path specified in
731- the *extract_dir * argument, e.g. members that have absolute filenames
732- starting with "/" or filenames with two dots "..".
731+ the *extract_dir * argument, for example, members that have absolute filenames
732+ or filenames with ".." components .
733733
734734 .. versionchanged :: 3.7
735735 Accepts a :term: `path-like object ` for *filename * and *extract_dir *.
Original file line number Diff line number Diff line change @@ -374,9 +374,9 @@ ZipFile objects
374374 .. warning ::
375375
376376 Never extract archives from untrusted sources without prior inspection.
377- It is possible that files are created outside of *path *, e.g. members
378- that have absolute filenames starting with `` "/" `` or filenames with two
379- dots `` ".." ``. This module attempts to prevent that.
377+ It is possible that files are created outside of *path *, for example, members
378+ that have absolute filenames or filenames with ".." components.
379+ This module attempts to prevent that.
380380 See :meth: `extract ` note.
381381
382382 .. versionchanged :: 3.6
@@ -547,7 +547,7 @@ Path objects
547547 The :class: `Path ` class does not sanitize filenames within the ZIP archive. Unlike
548548 the :meth: `ZipFile.extract ` and :meth: `ZipFile.extractall ` methods, it is the
549549 caller's responsibility to validate or sanitize filenames to prevent path traversal
550- vulnerabilities (e.g., filenames containing ".." or absolute paths ). When handling
550+ vulnerabilities (for example, absolute paths or paths with ".." components ). When handling
551551 untrusted archives, consider resolving filenames using :func: `os.path.abspath `
552552 and checking against the target directory with :func: `os.path.commonpath `.
553553
You can’t perform that action at this time.
0 commit comments