You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address an issue where data paths were not properly escaped during extraction, leading to potential security vulnerabilities. This update ensures that all data paths are correctly handled to prevent any unintended exposure.
Address an issue where data paths were not properly escaped during extraction, leading to potential security vulnerabilities. This update ensures that all data paths are correctly handled to prevent any unintended exposure.
Fixes#115
This PR addresses #115 by decoding URL-encoded package paths during module installation and validating that decoded paths remain inside the extraction directory.
Changes:
Replaces whole-archive extraction with a custom asynchronous extraction loop.
Adds destination containment checks after URL decoding.
Adds a regression test for encoded spaces in file and directory names.
File
Description
Source/Core/ModuleFastInstaller.cs
Decodes archive paths, validates destinations, and extracts entries asynchronously.
ModuleFast.tests.ps1
Tests extraction of URL-encoded file and directory names.
Add extraction tests for decoded path traversal protection
Source/Core/ModuleFastInstaller.cs:53
The new extraction tests cover valid decoded names and cancellation, but do not exercise this replacement for the framework's path-traversal protection. They would still pass if the containment check were removed or moved before decoding. Add negative cases for %2e%2e/outside.txt, an absolute path outside the destination, and traversal into a sibling directory whose name shares the destination prefix. On Windows, also cover encoded backslashes such as %2e%2e%5coutside.txt. Assert that extraction throws and creates no file or directory outside the destination.
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
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.
Address an issue where data paths were not properly escaped during extraction, leading to potential security vulnerabilities. This update ensures that all data paths are correctly handled to prevent any unintended exposure.
Fixes #115