neils-dev commented on code in PR #3726:
URL: https://github.com/apache/ozone/pull/3726#discussion_r957872302


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/signature/StringToSignProducer.java:
##########
@@ -249,6 +249,7 @@ private static String urlEncode(String str) {
     try {
       return S3Utils.urlEncode(str)
           .replaceAll("\\+", "%20")
+          .replaceAll("\\*", "%2A")
           .replaceAll("%7E", "~");
     } catch (UnsupportedEncodingException e) {

Review Comment:
   Thanks @symious for catching is problem and submitting this fix.  As the uri 
is included in the string2sign and signature validation do we need to extend 
this encoding to support other special characters that need to be in ASCII hex 
or vice-versa?
   For the URLEncoder class, all alphanumeric characters remain the same after 
encoding.  However the spaces are converted to '+' that we correct for in line 
251.  All special characters ".", "-", "\*" , and  remain the"_"  same.  With 
all others converted to hex.  Are there any other cases o f special characters 
that we need to convert to hex similar to the '*"? 
   



-- 
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: [email protected]

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