Skip to content

Fix path handling bug in safe_tarfile_extractall#219

Merged
bbannier merged 2 commits intozeek:masterfrom
bbannier:topic/bbannier/commonprefix
Mar 5, 2026
Merged

Fix path handling bug in safe_tarfile_extractall#219
bbannier merged 2 commits intozeek:masterfrom
bbannier:topic/bbannier/commonprefix

Conversation

@bbannier
Copy link
Copy Markdown
Member

@bbannier bbannier commented Mar 5, 2026

The helper function is_within_directory could return false positives which might have lead to incorrect tarball extraction. This was triggered by https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix; we run into the same issue as mentioned there.

bbannier added 2 commits March 5, 2026 08:53
The helper function `is_within_directory` could return false positives
which might have lead to incorrect tarball extraction. This was
triggered by
https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix;
we run into the same issue as mentioned there.
@bbannier bbannier self-assigned this Mar 5, 2026
@bbannier bbannier marked this pull request as ready for review March 5, 2026 08:03
@bbannier bbannier requested a review from awelzel March 5, 2026 08:03
@bbannier bbannier merged commit 854b5d4 into zeek:master Mar 5, 2026
5 checks passed
@bbannier bbannier deleted the topic/bbannier/commonprefix branch March 5, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants