tar: resolve symlink resilience and path normalization issues#323
Open
kaladron wants to merge 1 commit into
Open
tar: resolve symlink resilience and path normalization issues#323kaladron wants to merge 1 commit into
kaladron wants to merge 1 commit into
Conversation
kaladron
commented
Jul 11, 2026
Collaborator
- Use symlink_metadata instead of exists/is_dir in create_archive, get_tree, and print_verbose_tree to avoid incorrectly following symlinks.
- Disable following symlinks in tar Builder by default.
- Implement clean_path to fix path normalization for paths containing parent directory components (..).
- Add integration tests for symlinks, nested symlinks, and path normalization.
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #323 +/- ##
==========================================
+ Coverage 96.84% 97.93% +1.08%
==========================================
Files 11 15 +4
Lines 1492 1982 +490
Branches 29 42 +13
==========================================
+ Hits 1445 1941 +496
+ Misses 46 40 -6
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
628947a to
a34fc9e
Compare
- Use symlink_metadata instead of exists/is_dir in create_archive, get_tree, and print_verbose_tree to avoid incorrectly following symlinks. - Disable following symlinks in tar Builder by default. - Implement clean_path to fix path normalization for paths containing parent directory components (..). - Add integration tests for symlinks, nested symlinks, and path normalization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.