Conversation
5 tasks
wilx
force-pushed
the
hardlinks-v2
branch
2 times, most recently
from
September 14, 2026 17:29
edcfad4 to
4b2cc87
Compare
wilx
marked this pull request as ready for review
September 14, 2026 17:30
8 tasks
Author
|
Rebased. |
wilx
marked this pull request as draft
September 26, 2026 11:12
Resolve existing path components before checking containment, including missing destinations and symlink/.. roots. Share the resolver between ordinary extraction and TAR hard links, reject final symlinks for ordinary entries, and avoid changing symlink target metadata. Add shared, TAR, and ZIP regressions while preserving traversal policy and extraction hooks.
Extract 512 physical links and check their shared inode and timestamp. Exercise a separate 2000-link logical chain through TarFile content resolution without requiring thousands of filesystem links.
Reuse up to 1024 physical directory spellings after fresh type and file-identity checks, and clear the cache after each extraction. Resolve relative entry components from the already resolved root to avoid repeating its path walk. Keep symlinks, missing paths, and providers without file identities on fresh resolution. Cover directory replacement, newly created symlinks, and extractor reuse after failure.
Use the relative-path shortcut only for paths without a root. Resolve other forms against the extraction root through Path.resolve before checking containment. Cover rooted backslash, rooted forward-slash, and drive-relative mappings through shared extraction, TAR, and ZIP.
wilx
marked this pull request as ready for review
September 26, 2026 13:49
wilx
marked this pull request as draft
September 26, 2026 13:53
wilx
marked this pull request as ready for review
September 26, 2026 14:16
This branch has not been deployed
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.
What does this change?
Adds streaming TAR hard-link extraction, opt-in preservation, and logical content access through archived file sets.
TarArchiver.setPreserveHardLinks(true)preserves resources with equal identities and compatible output metadata. The default isfalse; transformed contents, unknown identities, and conflicting metadata produce full entries. Resource subclasses must explicitly guarantee their content identity.Related issue
Addresses PR #286 using explicit resource identities, mapped destination handling, and logical resource reads, while retaining the protected
AbstractUnArchiver.extractFilesignature.Depends on Plexus IO PR #191.
Local builds require installing itsThese changes are released in Plexus IO3.7.1-SNAPSHOTfirst, then building Archiver with JDK 17+. The dependency must be available to CI and its version finalized before merging.3.8.0, which this PR now uses. Build Archiver with JDK 17+.Anything reviewers should look at closely?
TarUnArchiver.setFailOnSymlinkTraversal(true)rejects intermediate symlinks in destinations and hard-link targets. Both settings enforce destination containment; failures can leave earlier outputs in place.Documentation covers detailed semantics, GNU tar/bsdtar differences, replay/cache tradeoffs, and Maven Assembly configuration.
Validation
Validation is Linux-only; Windows and macOS remain unvalidated.