Repository navigation
fix: make manifest path validation platform-independent - #2
Merged
Merged
Conversation
std::path::Component does not recognize Windows drive-letter paths on Unix, so 'C:/...' entries were treated as relative in the Linux CI leg. Validate separators, drive prefixes, empty segments, '.', and '..' explicitly before any restore write, and prepare v26.0-Alpha.2.
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.
Problem
The Linux CI leg failed on v26.0-Alpha.1:
std::path::Componentdoes not recognizeC:/...as a Windows prefix on Unix, so the path-safety unit test failed and a malformed manifest entry could be treated as relative on Linux.Fix
Validate manifest paths explicitly and platform-independently before any restore write: reject POSIX absolute paths, Windows drive-letter prefixes, UNC paths, NUL bytes, empty segments,
.and... Adds no new dependency.Verified
cargo fmt --all -- --checkcleancargo clippy --workspace --all-targets -- -D warningscleancargo test --workspace: 26 tests passing (14 unit + 9 workflow + 3 CLI)Also bumps the workspace version to
0.1.0-alpha.2and records the v26.0-Alpha.2 changelog entry.