From: yuliyang_yewu Date: Wed, 22 Jul 2020 02:05:17 +0000 (+0800) Subject: rgw: replace '+' with "%20" in canonical query string for s3 X-Git-Tag: v14.2.12~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37467%2Fhead;p=ceph.git rgw: replace '+' with "%20" in canonical query string for s3 v4 auth. fix https://tracker.ceph.com/issues/45983 Signed-off-by: yuliyang_yewu (cherry picked from commit 9002be34aa8524816708db4f3429bfe8634b776a) --- diff --git a/src/rgw/rgw_auth_s3.cc b/src/rgw/rgw_auth_s3.cc index dc96471ff7a8..f7a8af6797a3 100644 --- a/src/rgw/rgw_auth_s3.cc +++ b/src/rgw/rgw_auth_s3.cc @@ -497,7 +497,7 @@ std::string get_v4_canonical_qs(const req_info& info, const bool using_qs) } if (params->find_first_of('+') != std::string::npos) { copy_params = *params; - boost::replace_all(copy_params, "+", " "); + boost::replace_all(copy_params, "+", "%20"); params = ©_params; }