]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
fix: Revert url_decode to old behaviour
authorEmin <emin.sunacoglu@clyso.com>
Tue, 10 Jun 2025 09:03:21 +0000 (11:03 +0200)
committerEmin <emin.sunacoglu@clyso.com>
Tue, 10 Jun 2025 09:30:32 +0000 (11:30 +0200)
Signed-off-by: Emin <emin.sunacoglu@clyso.com>
src/rgw/rgw_common.cc

index 92c857fd1e94cde6ac7ab0f26c8a0a7819a565e7..95ecd0c2bb42c2df3e9cbedc9b64bb6573644af9 100644 (file)
@@ -1766,14 +1766,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;
 }