Skip to content

Port .NET 11 Blazor component fix - #10240

Merged
oroztocil merged 1 commit into
mainfrom
oroztocil/net11-fix-port
Oct 15, 2026
Merged

oroztocil merged 1 commit into
mainfrom
oroztocil/net11-fix-port

Conversation

@oroztocil

Copy link
Copy Markdown
Member

No description provided.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 09:50
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team October 15, 2026 09:51
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
oroztocil force-pushed the oroztocil/net11-fix-port branch from 6a795ba to 6a2d90d Compare October 15, 2026 11:57
@oroztocil
oroztocil enabled auto-merge October 15, 2026 11:59
@oroztocil
oroztocil merged commit 85ada61 into main Oct 15, 2026
11 checks passed
@oroztocil
oroztocil deleted the oroztocil/net11-fix-port branch October 15, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants