Skip to content

Commit c603ce7

Browse files
committed
fix: Revert url_decode to old behaviour
Signed-off-by: Emin <[email protected]>
1 parent 1510987 commit c603ce7

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
@@ -1766,14 +1766,13 @@ std::string url_decode(const std::string_view& src_str, bool in_query)
17661766
const char c1 = hex_to_num(*src++);
17671767
const char c2 = hex_to_num(*src);
17681768
if (c1 < 0 || c2 < 0) {
1769-
src--;
1770-
src--; //going back to the %
1771-
dest_str.push_back(*src); //add % to the target destination string
1769+
return std::string();
17721770
} else {
17731771
dest_str.push_back(c1 << 4 | c2);
17741772
}
17751773
}
17761774
}
1775+
17771776
return dest_str;
17781777
}
17791778

0 commit comments

Comments
 (0)