Skip to content

Conversation

@johatuni
Copy link
Contributor

@johatuni johatuni commented Jan 8, 2024

Added a null check in ResolveHasInvalidAntiforgeryValidationFeature()

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

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

@ghost ghost added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member labels Jan 8, 2024
@ghost
Copy link

ghost commented Jan 8, 2024

Thanks for your PR, @johatuni. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@johatuni
Copy link
Contributor Author

johatuni commented Jan 9, 2024

@dotnet-policy-service agree company="Unimicro"

@ghost ghost added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 17, 2024
…e will now be set to null if Form is set to null.
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment Feb 13, 2024
@dotnet-policy-service dotnet-policy-service bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 13, 2024
@wtgodbe wtgodbe removed the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 13, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 20, 2024
Copy link
Member

@amcasey amcasey left a 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;
Copy link
Member

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.

@amcasey
Copy link
Member

amcasey commented Feb 22, 2024

Well, those CI failures are clearly unrelated... Let's try a re-run.

@amcasey
Copy link
Member

amcasey commented Feb 22, 2024

/azp run

@dotnet-policy-service dotnet-policy-service bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 22, 2024
@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@amcasey
Copy link
Member

amcasey commented Feb 22, 2024

#54177 should unblock CI when it merges.

@amcasey
Copy link
Member

amcasey commented Feb 23, 2024

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Mar 2, 2024
@amcasey
Copy link
Member

amcasey commented Mar 4, 2024

/azp run

@dotnet-policy-service dotnet-policy-service bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Mar 4, 2024
@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@amcasey amcasey enabled auto-merge (squash) March 4, 2024 17:41
@amcasey amcasey merged commit 2c0ee4c into dotnet:main Mar 4, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview3 milestone Mar 4, 2024
@johatuni johatuni deleted the johatuni/gh/53099 branch March 11, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FormFeature initialized with an IFormCollection instance throws NullReferenceException in Form property getter

7 participants