-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Added a null check in ResolveHasInvalidAntiforgeryValidationFeature() #53208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for your PR, @johatuni. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
@dotnet-policy-service agree company="Unimicro" |
…n ReadFormAsync() to guard against _request equal to null
…e will now be set to null if Form is set to null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some nits, but LGTM.
{ | ||
return false; | ||
} | ||
|
||
var contentType = ContentType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I think it would be clearer to check whether contentType
is null (rather than testing _request
) - the fact that a null _request
yields a null ContentType
seems like an implementation detail.
Co-authored-by: Andrew Casey <[email protected]>
Co-authored-by: Andrew Casey <[email protected]>
Well, those CI failures are clearly unrelated... Let's try a re-run. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
#54177 should unblock CI when it merges. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Added a null check in ResolveHasInvalidAntiforgeryValidationFeature()
Summary of the changes (Less than 80 chars)
Description
Added a null check for the _request field since this will be null when type is constructed with the constructor taking a IFormCollection parameter.
Fixes #53099