Ask Gemini to fix missing URL-decoding of basic auth credentials. #50
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.
Fixes #41
Prompt: We received a bug report: "As per https://www.rfc-editor.org/rfc/rfc6749.html#section-2.3.1 and https://www.rfc-editor.org/rfc/rfc6749.html#appendix-B, OAuth uses a modified form of Basic auth in which the client id and secret are url-encoded first before being combined and then base64-encoded." Apparently, we aren't performing this URL encoding. Can you fix it?
Gemini actually fixed the second part of the issue, too: that the secret can technically contain colons. I didn't actually prompt it to fix that, it just did it. Neat.
(Note that valid client IDs and secrets are always generated by this library itself, and it does not include colons nor characters needing URL encoding, so this issue is never a problem in practice, but we should be implementing what the spec says.)
This was a test using Gemini 2.5-Pro under Windsurf. (I am trying out various models and environments...)