sumangala-patki commented on a change in pull request #2845:
URL: https://github.com/apache/hadoop/pull/2845#discussion_r610997227



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsHttpOperation.java
##########
@@ -558,6 +560,24 @@ public String getSignatureMaskedEncodedUrl() {
     return this.maskedEncodedUrl;
   }
 
+  public void maskSASObjectIDs() {
+    int oidStartIdx, ampIdx, oidEndIndex, qpStrIdx;

Review comment:
       done

##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsHttpOperation.java
##########
@@ -558,6 +560,24 @@ public String getSignatureMaskedEncodedUrl() {
     return this.maskedEncodedUrl;
   }
 
+  public void maskSASObjectIDs() {
+    int oidStartIdx, ampIdx, oidEndIndex, qpStrIdx;
+    for (String qpKey : SAS_OID_PARAM_KEYS) {
+      qpStrIdx = maskedUrl.indexOf('&' + qpKey);
+      if (qpStrIdx == -1) {
+        qpStrIdx = maskedUrl.indexOf('?' + qpKey);
+        if (qpStrIdx == -1) {
+          continue;
+        }
+      }
+      oidStartIdx = qpStrIdx + qpKey.length() + 1;
+      ampIdx = maskedUrl.indexOf("&", oidStartIdx);
+      oidEndIndex = (ampIdx != -1) ? ampIdx : maskedUrl.length();
+      maskedUrl = maskedUrl.substring(0, oidStartIdx + 5) + "XXXX" + maskedUrl
+          .substring(oidEndIndex);
+    }

Review comment:
       done




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to