Skip to content

Refactor private PushAuthorizationRequest #59990

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

Merged

Conversation

marcusber
Copy link
Contributor

Refactor private PushAuthorizationRequest

  • 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.

An exception was created but not thrown. Make relevant changes to remove that.

Description

An exception was created but not thrown. When backtracking the usage of the private method, the PAR-endpoint was already guarded for empty PAR-enpoints.
Pass in the PAR-endpoint as non-null reference to the private method. Remove the exception that was created and not thrown.

Existing unit tests never reaches the private method due to guards in the calling method.

I'm not sure which branch this PR should target. It should be compatible with main when cherry-picked.

@ghost ghost added the area-security label Jan 22, 2025
@marcusber
Copy link
Contributor Author

@dotnet-policy-service agree

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 22, 2025
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0.x milestone Jan 22, 2025
Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

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

I just noticed that this is targeting release/9.0. The bar for patching releases is pretty high, and I don't think this refactor meets it. Can you retarget this to main? Thanks.

An exception was created but not thrown. When backtracking the usage of the private method, the PAR-endpoint was already guarded for null/empty value.
The initial guard for empty is there for future usages, the call is redundant now.
@marcusber marcusber force-pushed the marcusber/release/9.0/throwParException branch from 598ac5a to 246b106 Compare January 30, 2025 06:20
@marcusber marcusber changed the base branch from release/9.0 to main January 30, 2025 06:20
@marcusber
Copy link
Contributor Author

@halter73 The branch name is missleading, but the branch is up to date with main.

@halter73 halter73 modified the milestones: 9.0.x, 10.0-preview2 Jan 30, 2025
Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

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

Thanks again!

@halter73 halter73 merged commit ad17323 into dotnet:main Jan 30, 2025
27 checks passed
captainsafia pushed a commit that referenced this pull request Feb 11, 2025
An exception was created but not thrown. When backtracking the usage of the private method, the PAR-endpoint was already guarded for null/empty value. The initial guard for empty is there for future usages, the call is redundant now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-security 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.

3 participants