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 355 - Don't duplicate ? if qs in redirect url #356

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

geoff-va
Copy link

Instead of appending a ? or # (implicit), parse the query string and fragment for parameters. Add our parameters and rebuild the redirect uri. This also changes %20 to + in query strings (since it was originally quoteed and now I'm using urlencode. No double dipping.)

This should hopefully be more robust to redirect_uri's containing query parameters / fragment parameters.

One thing that it will not account for is if the fragment doesn't contain a parameter, but a single argument. That would be lost. But I'm not sure if you could legally combine those in a fragment? eg: https://example.com/#anchor&param=value

This also adds tests for AuthorizeError.create_uri and fixes updates the test_missing_nonce test to account for this change.

Instead of appending a ? or # (implicit), parse the query
string and fragment for parameters. Add our parameters
and rebuild the redirect uri

This should hopfully be more robust to redirect_uri's
containing query parametes / fragment parameters

One thing that it will not account for is if the fragment
doesn't contain a parameter, but a single argument. That would
be lost. But I'm not sure if you could legally combine those in
a fragment? eg: https://example.com/#anchor&param=value

This also adds tests for AuthorizeError.create_uri and fixes updates
the test_missing_nonce test to account for this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant