Repository navigation
Port .NET 11 Blazor component fix - #10240
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The browser regression test’s completion signal can precede authorization processing, allowing its assertions to pass prematurely.
1 open finding
What changed in this PR
Ports a Blazor authorization fix that prevents superseded asynchronous evaluations from overwriting the current page’s authorization state.
Changes:
- Guards authorization state updates against superseded evaluations.
- Adds unit tests covering overlapping authorization evaluations.
- Adds a gated policy and browser regression test.
| File | Description |
|---|---|
| src/aspnetcore/src/Components/test/testassets/Components.TestServer/RazorComponents/App.razor | Adds the endpoints namespace import. |
| src/aspnetcore/src/Components/test/testassets/Components.TestServer/AuthenticationStartup.cs | Registers the server-side authorization gate and policy. |
| src/aspnetcore/src/Components/test/testassets/BasicTestApp/Program.cs | Registers the client-side authorization gate and policy. |
| src/aspnetcore/src/Components/test/testassets/BasicTestApp/AuthTest/PageRequiringSlowAsyncPolicy.razor | Adds a gated authorization test page. |
| src/aspnetcore/src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouterLayout.razor | Adds gate controls and progress display. |
| src/aspnetcore/src/Components/test/testassets/BasicTestApp/AuthTest/AsyncAuthorizationGate.cs | Provides test-controlled policy completion. |
| src/aspnetcore/src/Components/test/E2ETest/Tests/AuthTest.cs | Tests navigation during pending authorization. |
| src/aspnetcore/src/Components/Authorization/test/TrackingTestRenderer.cs | Tracks asynchronous parameter-setting tasks. |
| src/aspnetcore/src/Components/Authorization/test/GatedTestAuthorizationService.cs | Controls authorization outcomes for unit tests. |
| src/aspnetcore/src/Components/Authorization/test/AuthorizeViewCoreTest.cs | Tests superseded authorization results and principal changes. |
| src/aspnetcore/src/Components/Authorization/src/AuthorizeViewCore.cs | Prevents superseded results from updating component state. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
oroztocil
force-pushed
the
oroztocil/net11-fix-port
branch
from
October 15, 2026 11:57
6a795ba to
6a2d90d
Compare
dariatiurina
approved these changes
Oct 15, 2026
oroztocil
enabled auto-merge
October 15, 2026 11:59
akoeplinger
approved these changes
Oct 15, 2026
This was referenced Oct 19, 2026
This was referenced Oct 27, 2026
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.

No description provided.