Fix #yogosha4539

This commit is contained in:
Laurent Destailleur 2020-09-19 18:01:06 +02:00
parent c6e66d1651
commit 673e1fe5aa

View File

@ -57,7 +57,9 @@ if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO']))
*/
function testSqlAndScriptInject($val, $type)
{
$val=html_entity_decode($val, ENT_QUOTES); // So <svg o&#110;load='console.log(&quot;123&quot;)' become <svg onload='console.log(&quot;123&quot;)'
$val = html_entity_decode($val, ENT_QUOTES); // So <svg o&#110;load='console.log(&quot;123&quot;)' become <svg onload='console.log(&quot;123&quot;)'
$val = str_replace('%09', '', $val); // 'java%09script' is processed like 'javascript' (whatever is place of %09)
// TODO loop to decode until no more thing to decode ?
$inj = 0;