Backport SHR p-claim percent-encoding hex case handling to dev8x - #3579
Merged
debchoudhury-id4s merged 1 commit intoJul 31, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Backports the Signed HTTP Request (SHR) p claim validation fix to the dev8x line so that percent-encoded triplets compare equivalently regardless of hex-letter casing (e.g., %2F == %2f) while preserving the existing UseCaseSensitivePClaimComparison behavior for literal path casing and keeping creation output unchanged.
Changes:
- Updates
SignedHttpRequestHandler.ValidatePClaimto perform an additional percent-triplet-aware comparison when ordinal comparison fails. - Expands SHR
pclaim validation and creation test coverage for percent-encoding hex-case scenarios and delimiter-vs-encoded character distinctions. - Adds a changelog entry describing the behavior change.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Microsoft.IdentityModel.Protocols.SignedHttpRequest/SignedHttpRequestHandler.cs | Implements percent-triplet-aware equality for p claim validation (case-insensitive hex letters only within valid %XX triplets). |
| test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestValidationTests.cs | Adds comparison-matrix coverage and exception-message casing preservation tests for ValidatePClaim. |
| test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestCreationTests.cs | Adds tests ensuring p claim creation preserves percent-encoding hex casing and double-encoding. |
| CHANGELOG.md | Documents the bug fix in the 8.x changelog. |
RojaEnnam
approved these changes
Jul 30, 2026
saurabhsathe-ms
approved these changes
Jul 31, 2026
This was referenced Sep 21, 2026
This was referenced Oct 1, 2026
Bump System.IdentityModel.Tokens.Jwt from 8.19.1 to 8.23.0
andersorlinder/laundry-booking-backend#11
Open
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
Backports #3561 to the dev8x branch.
Replaces the fork-based PR #3578.
Testing