Repository navigation
fix(decompress): restore percent-encoded MSIX filenames - #6818
Open
Doomguy-BFG9000 wants to merge 3 commits into
Open
Doomguy-BFG9000 wants to merge 3 commits into
Doomguy-BFG9000 wants to merge 3 commits into
Conversation
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.
Description
Restore percent-encoded filenames when extracting MSIX packages through either ZIP extractor, including downloads renamed to
dl.zip. Detect MSIX packages by their footprint files and rename only entries belonging to the extracted archive, after applyingextract_dir.Decode each path component once, with children before parents. Preserve literal names in ordinary ZIP archives, reject unsafe decoded components and conflicting archive entries before extraction, and refuse to overwrite an existing decoded destination.
Motivation and Context
Closes #6757
MSIX payloads can contain paths such as
node_modules/%40oai/sky/package.json, while applications expectnode_modules/@oai/sky/package.json. The manifest workaround in ScoopInstaller/Extras#18828 does not address the underlying extraction behavior in Scoop core.How Has This Been Tested?
Invoke-Extractiondispatcher.extract_dir, ordinary ZIP files, unrelated destination files, collisions, traversal, encoded separators, alternate data streams, and null characters.developpassed 2 tests and failed 24; the missing scoped-package paths reproduced with both extractors.git diff --checkpasses.Tests use isolated temporary Scoop/config/cache directories. The full installation/decompression suite and installation of the affected application were not run.
Checklist:
developbranch.

Confidence Score: 5/5
The changes appear safe to merge, with all previous findings addressed.Summary
Restores percent-encoded MSIX paths through both ZIP extractors while leaving ordinary ZIP names unchanged.
All three previous findings are addressed. No new actionable issue was found in the changes since the previous review.
Reviews (3) · Last reviewed commit: "fix(decompress): preserve skipped MSIX p..." · Reviewed by Greptile