Skip to content

gh-156026: document tar filter link targets - #156056

Open
Amandot wants to merge 1 commit into
python:mainfrom
Amandot:gh-156026-tar-filter-link-targets
Open

gh-156026: document tar filter link targets#156056
Amandot wants to merge 1 commit into
python:mainfrom
Amandot:gh-156026-tar-filter-link-targets

Conversation

@Amandot

@Amandot Amandot commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Document the behavior of the tar extraction filter when handling
symbolic-link targets.

tar_filter protects against archive member paths escaping the extraction
destination, but it does not check TarInfo.linkname. As a result, symbolic
links with absolute targets or relative targets outside the destination are
not rejected by this filter.

This change clarifies that behavior in the tar filter documentation and
the tar_filter section.

The stricter data_filter behavior is also documented, including the
exceptions raised for unsafe link targets.

No extraction behavior has been changed.

Testing

  • git diff --check
  • Full documentation checks were attempted, but the documentation environment
    required dependency installation and the check was not completed.

@Amandot
Amandot requested a review from ethanfurman as a code owner August 19, 2026 14:46
@python-cla-bot

python-cla-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34139088 | 📁 Comparing bdb2a0e against main (20e6c2f)

  🔍 Preview build  

1 file changed
± library/tarfile.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant