Repository navigation
[main] Restore slash-only PathString boundaries (CVE-2026-114156) - #70447
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: fdac132c-0926-4fda-8c97-88ae5b59b9fd
DeagleGross
marked this pull request as ready for review
November 10, 2026 19:56
DeagleGross
approved these changes
Nov 10, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Regression coverage is missing for rejecting leading backslashes and backslash segment boundaries, including empty matched and remaining outputs on failure.
2 open issues
What changed in this PR
Restores slash-only PathString behavior in HTTP abstractions, reversing the backslash handling introduced by #67093.
Changes:
- Requires non-empty paths to begin with
/and restores slash-only segment matching and concatenation. - Removes backslash-specific API remarks and updates the constructor error message.
- Updates the constructor test and removes tests expecting backslash boundary behavior.
| File | Description |
|---|---|
src/Http/Http.Abstractions/test/PathStringTests.cs |
Updates the expected error and removes backslash-handling cases. |
src/Http/Http.Abstractions/src/Resources.resx |
Restores the slash-only validation resource name and message. |
src/Http/Http.Abstractions/src/PathString.cs |
Restores slash-only construction, matching, concatenation, and documentation. |
Review effort: Balanced
| if (value1.StartsWith(value2, comparisonType)) | ||
| { | ||
| return value1.Length == value2.Length || value1[value2.Length] is '/' or '\\'; | ||
| return value1.Length == value2.Length || value1[value2.Length] == '/'; |
Comment on lines
+13
to
+16
| public void CtorThrows_IfPathDoesNotHaveLeadingSlash() | ||
| { | ||
| ExceptionAssert.ThrowsArgument(() => new PathString("hello"), "value", "The path in 'value' must start with '/' or '\\'."); | ||
| // Act and Assert | ||
| ExceptionAssert.ThrowsArgument(() => new PathString("hello"), "value", "The path in 'value' must start with '/'."); |
Member
|
CodeCheck failure is a false positive |
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:40 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:40 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:41 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:43 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:44 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:45 — with
GitHub Actions
Inactive
Contributor
|
ℹ️ This pull request wasn't processed automatically. This change requires specialized review. Please confirm whether documentation updates are needed and handle them through the appropriate process. |
wtgodbe
temporarily deployed
to
copilot-pat-pool
November 11, 2026 16:45 — with
GitHub Actions
Inactive
This branch was previously 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.

Summary
PathStringconstruction and segment-boundary behavior.Addresses CVE-2026-114156.
Testing
Not run locally. The focused repository test setup was blocked before compilation because the required .NET 12 SDK needs MSBuild 18.7 or newer, while this machine has MSBuild 17.15. CI validation is required.