Skip to content
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

Fix duplicated query string parameters for VSO/AzDo provider #814

Merged

Conversation

martincostello
Copy link
Member

Fix query string parameters being duplicated if AuthorizationEndpoint contains any user-added query string parameters.

If this change looks good, I can look at making a similar change to the Google provider for dotnet/aspnetcore#47054.

/cc @Tratcher

Fix query string parameters being duplicated if `AuthorizationEndpoint` contains any user-added query string parameters.
@martincostello martincostello added this to the 8.0.0 milestone Nov 8, 2023
return QueryHelpers.AddQueryString(Options.AuthorizationEndpoint, query);
// Remove the query and re-add with the edit so that the parameters are not duplicated.
// See https://github.com/dotnet/aspnetcore/issues/47054 for more context.
challengeUri.Query = string.Empty;
Copy link

Choose a reason for hiding this comment

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

Something like:

Suggested change
challengeUri.Query = string.Empty;
challengeUri.Query = QueryString.Create(query);
return callengeUri.Uri.AbsoluteUri;

Apply code review suggestions.
@martincostello martincostello marked this pull request as ready for review November 12, 2023 07:29
@martincostello martincostello merged commit 515ada5 into aspnet-contrib:dev-v8 Nov 12, 2023
8 checks passed
@martincostello martincostello deleted the fix-duplicate-parameters branch November 12, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants