Skip to content

Commit 8e2af19

Browse files
mertsunacoglucbodley
authored andcommitted
fix: Revert url_decode to old behaviour
Signed-off-by: Emin <[email protected]> (cherry picked from commit c603ce7)
1 parent b1c1f7e commit 8e2af19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/rgw/rgw_common.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,14 +1765,13 @@ std::string url_decode(const std::string_view& src_str, bool in_query)
17651765
const char c1 = hex_to_num(*src++);
17661766
const char c2 = hex_to_num(*src);
17671767
if (c1 < 0 || c2 < 0) {
1768-
src--;
1769-
src--; //going back to the %
1770-
dest_str.push_back(*src); //add % to the target destination string
1768+
return std::string();
17711769
} else {
17721770
dest_str.push_back(c1 << 4 | c2);
17731771
}
17741772
}
17751773
}
1774+
17761775
return dest_str;
17771776
}
17781777

0 commit comments

Comments
 (0)