Repository navigation
fix: url-encode OAuth2 query parameters in Android, Apple and Unity - #2018
Merged
Merged
Conversation
Query values were joined raw and then escaped as a whole (or not at all), so a value containing &, +, # or = was split, decoded to a space or truncated. That broke the OAuth2 state and success/failure URLs on Android, Apple and Unity, and GET query values on Apple, Swift, .NET and Unity. Encode each key and value on its own.
2 tasks
🟢 Tier S · Ready to merge
The SDK templates encode query parameter names and values for Android OAuth redirects, Swift/Apple requests, and .NET/Unity requests. The PR adds a mock endpoint and e2e coverage for reserved characters in scalar and array query values across the applicable SDKs. Latest changes: The newest commits also percent-encode the Swift and Apple array parameter suffix (
📂 Walkthrough · 9
Reviewed the commits since |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Query values were joined raw, so
&,+,#or=inside a value (the OAuth2state, asuccessURL with a query or fragment) split, decoded to a space or truncated the value.Test: new
general.getQuerymock endpoint rejects anything butvalue=a&b+c#d=e%fandvalues=[a&b, c+d#e]; shared lineGET:/v1/mock/tests/general/query:passedadded to Apple, Swift, .NET and Unity, the SDKs whose GET path goes through the changed functions. DotNet90 seen red onmain's template and green with the fix. The Android OAuth2 URL is only built behind a browser redirect, which the e2e runner cannot drive, so Android has no e2e line for it.Closes #2019