You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method Util.percentEncode tries to replace the below characters
"+", "" and "%7E"
I am aware the java.net.URLEncode.encode does replace "+" with "%2B" and replace space character with "+" character
The "signature" String is already base64 encoded which contains only from character 'A' to '0',.... '9'...'+','/', '='
see Base64 character table
The '+' will be already encoded by the URLEncoder so there character replacement in the Util java class as below
.replace("+", "%20")
.replace("", "%2A")
.replace("%7E", "~");
Are not needed I think.
Describe alternatives you've considered
Please reconsider to remove the character replacement in the Util class
com.mastercard.developer.oauth.Util line 32 to 34
Additional context
Do you recommend me to create a pull request (PR) to address the optimization issue mentioned above ?
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
No
Describe the solution you'd like
The java class
src/main/java/com/mastercard/developer/oauth/OAuth.java
line 64 contains the below
The method Util.percentEncode tries to replace the below characters
"+", "" and "%7E"
I am aware the java.net.URLEncode.encode does replace "+" with "%2B" and replace space character with "+" character
The "signature" String is already base64 encoded which contains only from character 'A' to '0',.... '9'...'+','/', '='
see Base64 character table
The '+' will be already encoded by the URLEncoder so there character replacement in the Util java class as below
.replace("+", "%20")
.replace("", "%2A")
.replace("%7E", "~");
Are not needed I think.
Describe alternatives you've considered
Please reconsider to remove the character replacement in the Util class
com.mastercard.developer.oauth.Util line 32 to 34
Additional context
Do you recommend me to create a pull request (PR) to address the optimization issue mentioned above ?
The text was updated successfully, but these errors were encountered: