Repository navigation
Respect case in SignalR Redis group subscriptions - #70451
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: fdac132c-0926-4fda-8c97-88ae5b59b9fd
There was a problem hiding this comment.
🔵 Needs a closer look
Changes to connection-abort ordering and Redis subscription rollback require CI and real-client integration validation, since managed regression tests were not run and the fake subscriber does not establish recovery behavior.
No open issues 🎉
What changed in this PR
This PR makes SignalR’s Redis group tracking case-sensitive and coordinates subscription state with connection cleanup and failed subscription attempts.
Changes:
- Tracks group membership and disconnection state under the subscription manager’s lock.
- Rolls back failed subscriptions and schedules cleanup for all tracked groups.
- Ensures connections are aborted before lifetime-manager disconnect callbacks, with regression tests for casing, failures, and lifecycle ordering.
Managed tests were not completed locally due to the reported MSBuild/SDK mismatch; CI validation remains necessary.
| File | Description |
|---|---|
src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs |
Adds subscription inspection and failure-injection hooks. |
src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs |
Adds casing, subscription rollback, and disconnect-cleanup regression tests. |
src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs |
Uses case-sensitive group tracking and coordinated subscription cleanup. |
src/SignalR/server/StackExchangeRedis/src/Internal/RedisSubscriptionManager.cs |
Synchronizes membership updates, tracks disconnection, and rolls back failed subscriptions. |
src/SignalR/server/StackExchangeRedis/src/Internal/IRedisFeature.cs |
Shares the internal group-membership and disconnection-state contract. |
src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs |
Checks that connection abort precedes disconnect callbacks after connection setup failures. |
src/SignalR/server/Core/src/HubConnectionHandler.cs |
Aborts the connection before lifetime-manager disconnect cleanup. |
Review effort: Balanced
|
/review |
|
ℹ️ 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. |
Description
Make SignalR Redis group tracking case-sensitive and keep subscription state consistent when connections disconnect or subscribe/unsubscribe operations fail.
This addresses CVE-2026-114147.
Validation
Focused Redis and connection-lifecycle regression coverage is included. Managed tests were not completed locally because the current repository bootstrap selected an MSBuild version below the repository SDK minimum; normal PR CI is required before merge.