You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/01/18 09:26:00 UTC
[GitHub] hrsakai commented on a change in pull request #1073: Support Url Encode in Athenz auth params
hrsakai commented on a change in pull request #1073: Support Url Encode in Athenz auth params
URL: https://github.com/apache/incubator-pulsar/pull/1073#discussion_r162286733
##########
File path: pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java
##########
@@ -172,15 +174,20 @@ private PrivateKey loadPrivateKey(String privateKeyURL) {
privateKey = Crypto.loadPrivateKey(new File(privateKeyURL));
} else if (uri.getScheme().equals("file")) {
privateKey = Crypto.loadPrivateKey(new File(uri.getPath()));
- } else if(uri.getScheme().equals("data")) {
+ } else if (uri.getScheme().equals("data")) {
List<String> dataParts = Splitter.on(",").splitToList(uri.getSchemeSpecificPart());
- if (dataParts.get(0).equals("application/x-pem-file;base64")) {
+ // Support Urlencode but not decode here because already decoded by URI class.
+ if (dataParts.get(0).equals("application/x-pem-file")) {
Review comment:
Fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services