You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I found a problem with xss_clean function. I this code section (Security.php):
f (stripos($str, '%') !== false) {
do {
$oldstr = $str;
$str = rawurldecode($str);
$str = preg_replace_callback('#%(?:\s*[0-9a-f]){2,}#i', [$this, '_urldecodespaces'], $str);
} while ($oldstr !== $str);
unset($oldstr);
}
I have an input text, I send the following string: 60% acqua via post. If you try to encode UTF8 the result is 60¬qua because the blanks are removed and the utf8_encode found %ac and makes the conversion into ¬ . The issue is when a sequence of chars identifies ASCII CODE (for example: 90% cars is converted in 90Êrs).
I have changed f (stripos($str, '%') !== false) { in if (preg_match('~%[0-9A-F]{2}~i', $str) > 0) { to check if the string is an urlecoded. It works but I'm not sure 100% that is correct.
The text was updated successfully, but these errors were encountered:
I think I found a problem with xss_clean function. I this code section (Security.php):
f (stripos($str, '%') !== false) {
do {
$oldstr = $str;
$str = rawurldecode($str);
$str = preg_replace_callback('#%(?:\s*[0-9a-f]){2,}#i', [$this, '_urldecodespaces'], $str);
} while ($oldstr !== $str);
unset($oldstr);
}
I have an input text, I send the following string: 60% acqua via post. If you try to encode UTF8 the result is 60¬qua because the blanks are removed and the utf8_encode found %ac and makes the conversion into ¬ . The issue is when a sequence of chars identifies ASCII CODE (for example: 90% cars is converted in 90Êrs).
I have changed f (stripos($str, '%') !== false) { in if (preg_match('~%[0-9A-F]{2}~i', $str) > 0) { to check if the string is an urlecoded. It works but I'm not sure 100% that is correct.
The text was updated successfully, but these errors were encountered: