From: Emin Date: Tue, 10 Jun 2025 09:03:21 +0000 (+0200) Subject: fix: Revert url_decode to old behaviour X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1f9925eb3e628cb2199f570761ba6e12c3ba877;p=ceph.git fix: Revert url_decode to old behaviour Signed-off-by: Emin (cherry picked from commit c603ce719aca906d75af60e7d31bf13db09d8ec6) --- diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index 717b199d3f1a..505c4b3faec5 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -1735,14 +1735,13 @@ std::string url_decode(const std::string_view& src_str, bool in_query) const char c1 = hex_to_num(*src++); const char c2 = hex_to_num(*src); if (c1 < 0 || c2 < 0) { - src--; - src--; //going back to the % - dest_str.push_back(*src); //add % to the target destination string + return std::string(); } else { dest_str.push_back(c1 << 4 | c2); } } } + return dest_str; }