Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
89241a38
Commit
89241a38
authored
Aug 30, 2007
by
Lars Gustäbel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warn about possible risks when extracting untrusted archives.
parent
eba40650
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Doc/library/tarfile.rst
Doc/library/tarfile.rst
+11
-0
No files found.
Doc/library/tarfile.rst
View file @
89241a38
...
...
@@ -337,6 +337,13 @@ object, see :ref:`tarinfo-objects` for details.
reset each time a file is created in it. And, if a directory's permissions do
not allow writing, extracting files to it will fail.
.. warning::
Never extract archives from untrusted sources without prior inspection.
It is possible that files are created outside of *path*, e.g. members
that have absolute filenames starting with ``"/"`` or filenames with two
dots ``".."``.
.. versionadded:: 2.5
...
...
@@ -353,6 +360,10 @@ object, see :ref:`tarinfo-objects` for details.
are some issues you must take care of yourself. See the description for
:meth:`extractall` above.
.. warning::
See the warning for :meth:`extractall`.
.. method:: TarFile.extractfile(member)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment