[Python-checkins] r57764 - python/trunk/Doc/library/tarfile.rst

lars.gustaebel python-checkins at python.org
Thu Aug 30 22:24:31 CEST 2007


Author: lars.gustaebel
Date: Thu Aug 30 22:24:31 2007
New Revision: 57764

Modified:
   python/trunk/Doc/library/tarfile.rst
Log:
Warn about possible risks when extracting untrusted archives.


Modified: python/trunk/Doc/library/tarfile.rst
==============================================================================
--- python/trunk/Doc/library/tarfile.rst	(original)
+++ python/trunk/Doc/library/tarfile.rst	Thu Aug 30 22:24:31 2007
@@ -337,6 +337,13 @@
    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 @@
       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)
 


More information about the Python-checkins mailing list