Skip to content

[QUIC] Validate Close/Abort errorCode parameter - #102264

Merged
ManickaP merged 3 commits into
dotnet:mainfrom
ManickaP:quic-validate-error
May 16, 2024
Merged

[QUIC] Validate Close/Abort errorCode parameter#102264
ManickaP merged 3 commits into
dotnet:mainfrom
ManickaP:quic-validate-error

Conversation

@ManickaP

Copy link
Copy Markdown
Member

Also shuffle around validation methods for better reuse and fix typo.

Fixes #101385

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@dotnet dotnet deleted a comment from azure-pipelines Bot May 15, 2024
@dotnet dotnet deleted a comment from azure-pipelines Bot May 15, 2024
@ManickaP

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries stress-http

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rzikm rzikm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, one question.

return;
}

ThrowHelper.ValidateErrorCode(nameof(Abort), errorCode);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what about the compiler-filled parameter propertyName, won't it produce weird error message? Same for QuicConnection.CloseAsync

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, you're right: System.ArgumentOutOfRangeException: 'errorCode' should be within [0, 4611686018427387903) range. (Parameter 'CloseAsync')
Changed to: System.ArgumentOutOfRangeException: 'CloseAsync.errorCode' should be within [0, 4611686018427387903) range. (Parameter 'errorCode') obviously for both CloseAsync and Abort.

@ManickaP
ManickaP merged commit 044e9d3 into dotnet:main May 16, 2024
@ManickaP
ManickaP deleted the quic-validate-error branch May 16, 2024 16:38
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* Validate Close/Abort errorCode parameter, shuffle around validation methods for better reuse

* Remove unnecassary PNSE exclusion

* Changed exception text and added tests.
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 2024
@karelz karelz added this to the 9.0.0 milestone Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QUIC] Check inputs for QuicConnection.CloseAsync and QuicStream.Abort

3 participants