tarfile.fully_trusted_filter
Prev: tarfile.FilterError | Up: tarfile | Next: tarfile.HeaderError
Rel: tarfile.AbsoluteLinkError, tarfile.AbsolutePathError, tarfile.CompressionError, tarfile.data_filter
Ref: docs.python.org — tarfile.fully_trusted_filter
Tags: #public #python3 #stdlib #tarfile
Import
import tarfile
from tarfile import fully_trusted_filter
Signature & Overview
tarfile.fully_trusted_filter(member, dest_path)
tarfile.fully_trusted_filter() function.
Usage
import tarfile
# Python 3.12+: restores legacy unrestricted extraction for trusted archives only
assert callable(tarfile.fully_trusted_filter)
Gotchas
- Never use on untrusted archives: Allows absolute paths, symlinks escaping
dst, and setuid bits.
REPL Inspect
from tarfile import fully_trusted_filter
help(fully_trusted_filter)
Linked from
Related notes
- tuts/python3/stdlib_module/tarfile/FilterError Linked here; links to this page; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/HeaderError Linked here; links to this page; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/AbsoluteLinkError Linked here; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/AbsolutePathError Linked here; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/CompressionError Linked here; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/data_filter Linked here; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/TarFile Linked here; shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/tarfile/ExtractError shared tags: #stdlib, #tarfile
- tuts/python3/stdlib_module/tarfile/is_tarfile shared tags: #stdlib, #tarfile