[ 
https://issues.apache.org/jira/browse/HADOOP-18498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17635328#comment-17635328
 ] 

ASF GitHub Bot commented on HADOOP-18498:
-----------------------------------------

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..





> [ABFS]: Error introduced when SAS Token containing '?' prefix is passed
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-18498
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18498
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/azure
>            Reporter: Sree Bhattacharyya
>            Assignee: Sree Bhattacharyya
>            Priority: Minor
>              Labels: pull-request-available
>
> Error Description:
> At present, SAS Tokens generated from the Azure Portal may or may not contain 
> a ? as a prefix. SAS Tokens that contain the ? prefix will lead to an error 
> in the driver due to a clash of query parameters. This leads to customers 
> having to manually remove the ? prefix before passing the SAS Tokens.
> Mitigation:
> After receiving the SAS Token from the provider, check if any prefix ? is 
> present or not. If present, remove it and pass the SAS Token.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to