mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Merge pull request #3016 from M4tteoP/uri_decode_invalid
fix: makes uri decode platform independent
This commit is contained in:
commit
6d719bee5b
@ -99,8 +99,8 @@ std::string uri_decode(const std::string & sSrc) {
|
||||
while (pSrc < SRC_LAST_DEC) {
|
||||
if (*pSrc == '%') {
|
||||
char dec1, dec2;
|
||||
if (-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)])
|
||||
&& -1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) {
|
||||
if ((char)-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)])
|
||||
&& (char)-1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) {
|
||||
*pEnd++ = (dec1 << 4) + dec2;
|
||||
pSrc += 3;
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user