From 878857997e41c910c5f8662e6def6d3d0357943c Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 19 May 2021 17:12:48 -0700 Subject: [PATCH] rgw: auth v4 client: don't convert '+' to space 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 --- src/rgw/rgw_auth_s3.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/rgw/rgw_auth_s3.cc b/src/rgw/rgw_auth_s3.cc index 629d1b9825b4..8b0b697ec907 100644 --- a/src/rgw/rgw_auth_s3.cc +++ b/src/rgw/rgw_auth_s3.cc @@ -578,16 +578,8 @@ static void add_v4_canonical_params_from_map(const map& 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); } } -- 2.47.3