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 2022/03/18 06:31:43 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #14739: trim tokenSecretKey file path.

codelipenghui commented on a change in pull request #14739:
URL: https://github.com/apache/pulsar/pull/14739#discussion_r829724830



##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/utils/AuthTokenUtils.java
##########
@@ -102,6 +102,9 @@ public static String createToken(Key signingKey, String subject, Optional<Date>
     public static byte[] readKeyFromUrl(String keyConfUrl) throws IOException {
         if (keyConfUrl.startsWith("data:") || keyConfUrl.startsWith("file:")) {
             try {
+                if (keyConfUrl.startsWith("file:")) {
+                    keyConfUrl = keyConfUrl.trim();
+                }

Review comment:
       Could you please help add a test to avoid regression?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org