Enhance the WAF
This commit is contained in:
parent
d1fa46089f
commit
6f01869bcb
1 changed files with 4 additions and 2 deletions
|
|
@ -752,7 +752,8 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
|||
$out = trim($out);
|
||||
do {
|
||||
$oldstringtoclean = $out;
|
||||
$out = str_ireplace(array('"', '"', '../'), '', $out);
|
||||
// Note &, '&', '&'... is a simple char like '&' alone but there is no reason to accept such way to encode input data.
|
||||
$out = str_ireplace(array('&', '&', '&', '"', '"', '"', '"', '"', '/', '/', '/', '../'), '', $out);
|
||||
} while ($oldstringtoclean != $out);
|
||||
// keep lines feed
|
||||
}
|
||||
|
|
@ -765,7 +766,8 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
|||
$out = trim($out);
|
||||
do {
|
||||
$oldstringtoclean = $out;
|
||||
$out = str_ireplace(array('"', '"', '../'), '', $out);
|
||||
// Note &, '&', '&'... is a simple char like '&' alone but there is no reason to accept such way to encode input data.
|
||||
$out = str_ireplace(array('&', '&', '&', '"', '"', '"', '"', '"', '/', '/', '/', '../'), '', $out);
|
||||
} while ($oldstringtoclean != $out);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue