-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix AccessTokenUtil does not url encode its parameters #40697
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 AccessTokenUtil does not url encode its parameters #40697
Conversation
| .append(RESOURCE_FRAGMENT).append(resource); | ||
| .append(CLIENT_ID_FRAGMENT).append(URLEncoder.encode(clientId, StandardCharsets.UTF_8)) | ||
| .append(CLIENT_SECRET_FRAGMENT).append(URLEncoder.encode(clientSecret, StandardCharsets.UTF_8)) | ||
| .append(RESOURCE_FRAGMENT).append(URLEncoder.encode(resource, StandardCharsets.UTF_8)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI:
- According to the ms doc, every parameters should url encoded, not encode one specific parameter nor the whole requestBody.
- According to the ms doc, the parameter should be
scope, notresource. I don't know why it useresourcehere. Anyway, I just keep the original behavior.
|
API change check API changes are not detected in this pull request. |
|
Hi, @saragluna , please help to review this PR. |
saragluna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change tested?
@saragluna |
|
/azp run java - keyvault - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run java - keyvault - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Fix bug: clientSecret not url encoded. (cherry picked from commit eb0d42f)
Description
Fix #40616
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines