Repository navigation
[release/11.0] Harden identity redirect handling in Blazor template - #70832
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kotlarmilos
approved these changes
Nov 25, 2026
Member
|
/ba-g Unrelated failures |
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.
Backport of #70796 to release/11.0
/cc @oroztocil
Harden identity redirect handling in Blazor template
Validate return URLs in the Blazor Identity template's redirect manager
Description
IdentityRedirectManager.RedirectToin the Blazor Web App template (Individual accounts) checks the raw redirect string, and the check can be bypassed. For example,returnUrl=https://app.example///evil.exampleredirects tohttps://evil.example/after sign-in. This change resolves the URI against the app's base URI and only uses it if the result stays within the app. Anything else redirects to the home page.Customer Impact
Apps created from the template have an open redirect. A crafted sign-in link can send users to another site after they sign in. Only newly created apps get the fix. Existing apps need to update their copy of
IdentityRedirectManager.Regression?
Risk
Template-only change to one method. Redirects within the app work as before.
Verification
Checked with a generated app in Chrome. Existing template tests cover the valid redirects.
Packaging changes reviewed?