You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/11/17 12:30:20 UTC

[GitHub] [hadoop] sreeb-msft commented on a diff in pull request #5136: HADOOP-18498. ABFS: Removing unwanted ? prefix from SAS Tokens

sreeb-msft commented on code in PR #5136:
URL: https://github.com/apache/hadoop/pull/5136#discussion_r1025128772


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -1130,6 +1130,10 @@ private String appendSASTokenToQuery(String path,
           sasToken = cachedSasToken;
           LOG.trace("Using cached SAS token.");
         }
+        // if SAS Token contains a prefix of ?, it should be removed
+        if(sasToken.charAt(0) == '?') {
+          sasToken = sasToken.substring(1);

Review Comment:
   At present, when any invalid SAS token is encountered, the exception thrown from the server itself when validation using that fails contains an appropriate message which is passed on to the calling application. So, any static checks on whether the string is actually a valid token or not is not in place..



-- 
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: common-issues-unsubscribe@hadoop.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org