Skip to content

Conversation

@liveans
Copy link
Member

@liveans liveans commented Jan 27, 2026

Backport of #123485 to release/8.0-staging

Customer Impact

  • Customer reported
  • Found internally

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

IMPORTANT: If this backport is for a servicing release, please verify that:

  • For .NET 8 and .NET 9: The PR target branch is release/X.0-staging, not release/X.0.
  • For .NET 10+: The PR target branch is release/X.0 (no -staging suffix).

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

Copilot AI review requested due to automatic review settings January 27, 2026 10:30
@liveans liveans changed the title [release/9.0-staging] Deny unmasked frame receive for WebSocket Server #123661 [release/8.0-staging] Deny unmasked frame receive for WebSocket Server #123661 Jan 27, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR backports WebSocket RFC 6455 compliance improvements from #123485 to the release/9.0-staging branch. It adds server-side validation to reject unmasked frames from clients, which is required by the WebSocket protocol specification.

Changes:

  • Added validation logic to deny unmasked frames received by WebSocket servers
  • Added corresponding error message resource string
  • Added unit test to verify the new validation behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs Adds validation to reject unmasked frames when operating as a server, following RFC 6455 requirements
src/libraries/System.Net.WebSockets/src/Resources/Strings.resx Adds error message resource for the unmasked frame validation error
src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs Adds test case to verify servers reject unmasked frames and enter Aborted state with appropriate error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants