Skip to content

Resolve archive extraction paths consistently across formats - #549

Draft
wilx wants to merge 1 commit into
codehaus-plexus:masterfrom
wilx:shared-extraction-paths
Draft

wilx wants to merge 1 commit into
codehaus-plexus:masterfrom
wilx:shared-extraction-paths

Conversation

@wilx

@wilx wilx commented Nov 28, 2026 •

Copy link
Copy Markdown

PR stack (merge order)

  1. #549 — Resolve archive extraction paths consistently across formats
  2. #548 — Replace final symlinks on overwrite and add strict TAR traversal checks
  3. #493 — Support streaming TAR hard-link extraction and opt-in preservation

Compare master → #549

TAR and ZIP-based readers now resolve each mapped entry name against the physical extraction root. The resolver follows intermediate symlinks before processing a later .. and checks containment even when the output file does not exist. The overwrite decision and the write use the same resolved destination. Standalone decompressors use the same root resolver to validate their configured destination.

On Windows, drive-relative names use the working directory of their drive. A contained NTFS junction can serve as a directory. Case-mismatch warnings use the spelling of the requested path through the junction. Ordinary existing parents take a fast path, and the directory cache checks filesystem identity before reusing a path during an extraction. Resolver tests · Cache tests

AbstractUnArchiver exposes resolveExtractionRoot and resolveExtractionPath as protected final methods. The resolver can be reviewed independently for a Java 8-compatible 4.x backport.

On Linux, clean verify javadoc:javadoc passed on JDK 17 and 26, with 567 tests passed and 26 skipped on each.

@wilx
wilx force-pushed the shared-extraction-paths branch from a6747e5 to 8ab4114 Compare November 28, 2026 19:08

This branch has not been deployed

No deployments
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.

1 participant