]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: auth v4 client: don't convert '+' to space 41462/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 20 May 2021 00:12:48 +0000 (17:12 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 20 May 2021 20:54:50 +0000 (13:54 -0700)
Fixes: https://tracker.ceph.com/issues/50920
The plus sign can be used to represent space after conversion, but this
pre conversion string representation will be hex encoded as plus.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_auth_s3.cc

index 629d1b9825b4d9f5d973364d4b0d5a0f88c1ad1e..8b0b697ec907f639ea49b1cf865b93f557f5ea46 100644 (file)
@@ -578,16 +578,8 @@ static void add_v4_canonical_params_from_map(const map<string, string>& m,
     if (key.empty()) {
       continue;
     }
-    const string *pval = &(entry.second);
-    string _val;
 
-    if (pval->find_first_of('+') != std::string::npos) {
-      _val = *pval;
-      boost::replace_all(_val, "+", " ");
-      pval = &_val;
-    }
-
-    (*result)[aws4_uri_recode(key, true)] = aws4_uri_recode(*pval, true);
+    (*result)[aws4_uri_recode(key, true)] = aws4_uri_recode(entry.second, true);
   }
 }