Skip to content

gh-143663: Perform path normalization in TarFile.extractall() - #143665

Merged
ethanfurman merged 10 commits into
python:mainfrom
0xd6cb6d73:fix-issue-143663
Nov 19, 2026
Merged

ethanfurman merged 10 commits into
python:mainfrom
0xd6cb6d73:fix-issue-143663

Conversation

@0xd6cb6d73

@0xd6cb6d73 0xd6cb6d73 commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes an issue on Windows caused by non-normalized destination paths when calling extractall().

@python-cla-bot

python-cla-bot Bot commented Jan 10, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@picnixz

picnixz commented Jan 10, 2026

Copy link
Copy Markdown
Member

Please do not open a PR until the bug has been acknowledged. We can't just normalize all paths. Normalization is not the default behavior. I will close thbe PR until it has been decided that this change should be done. Sorry.

@picnixz picnixz closed this Jan 10, 2026
@picnixz picnixz reopened this Jan 12, 2026
@0xd6cb6d73

0xd6cb6d73 commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Ended up fixing the issue in extractall and not _get_extract_tarinfo as discussed in the issue because that ended up impacting the internal representation of tar objects in a way that broke a lot of tests. I think it's enough because the crash only shows up when calling lstat, which extract doesn't do, and _extract_member already perform the same separator conversion before writing to disk.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 4, 2026
@victorvianna

Copy link
Copy Markdown

Chromium just ran into this issue. Is this PR still being pursued?

@ethanfurman
ethanfurman merged commit 562f08d into python:main Nov 19, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants