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

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

steveloughran commented on code in PR #5136:
URL: https://github.com/apache/hadoop/pull/5136#discussion_r1022841613


##########
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:
   what if the token length==1? it's clearly invalid, but what error gets 
raised?





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