Skip to content

Commit

Permalink
Backport warning to shutil.unpack_archive docs
Browse files Browse the repository at this point in the history
  • Loading branch information
encukou committed May 16, 2023
1 parent 3e2c2f9 commit f755ecd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,13 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.

.. audit-event:: shutil.unpack_archive filename,extract_dir,format shutil.unpack_archive

.. warning::

Never extract archives from untrusted sources without prior inspection.
It is possible that files are created outside of the path specified in
the *extract_dir* argument, e.g. members that have absolute filenames
starting with "/" or filenames with two dots "..".

.. versionchanged:: 3.7
Accepts a :term:`path-like object` for *filename* and *extract_dir*.

Expand Down

0 comments on commit f755ecd

Please sign in to comment.