Skip to content

Commit 136bc7e

Browse files
Improved phrasing for documentation of changes
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 4571846 commit 136bc7e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Doc/library/tarfile.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ Some facts and figures:
4242
or to acknowledge that they are expected and the archive is fully trusted.
4343

4444
.. versionchanged:: 3.14
45-
The default extraction filter was :func:`fully_trusted <fully_trusted_filter>` but is now :func:`data <data_filter>` which
46-
which disallows dangerous features like links to absolute paths or paths
47-
outside the destination.
45+
Set the default extraction filter to :func:`data <data_filter>`,
46+
which disallows dangerous features such as links to absolute paths
47+
or paths outside of the destination. Previously, the filter strategy
48+
was :func:`fully_trusted <fully_trusted_filter>`.
4849

4950
.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, **kwargs)
5051

@@ -503,7 +504,7 @@ be finalized; only the internally used file object will be closed. See the
503504
.. warning::
504505

505506
The default filter is set to ``filter='data'`` to prevent the most
506-
dangerous security issues, read the :ref:`tarfile-extraction-filter`
507+
dangerous security issues. Read the :ref:`tarfile-extraction-filter`
507508
section for details.
508509

509510
Never extract archives from untrusted sources without prior inspection,
@@ -545,7 +546,7 @@ be finalized; only the internally used file object will be closed. See the
545546
See the warning for :meth:`extractall`.
546547

547548
The default filter is set to ``filter='data'`` to prevent the most
548-
dangerous security issues, read the :ref:`tarfile-extraction-filter`
549+
dangerous security issues. Read the :ref:`tarfile-extraction-filter`
549550
section for details.
550551

551552
.. versionchanged:: 3.2
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Update tarfile library to use 'data' filter by default when extracting
1+
The default extraction filter for the :mod:`tarfile` module is now
2+
set to :func:`'data' <tarfile.data_filter>`.

0 commit comments

Comments
 (0)