mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix XSS injection into textarea
This commit is contained in:
@@ -116,6 +116,8 @@ function testSqlAndScriptInject($val, $type)
|
|||||||
$inj += preg_match('/union.+select/i', $val);
|
$inj += preg_match('/union.+select/i', $val);
|
||||||
$inj += preg_match('/(\.\.%2f)+/i', $val);
|
$inj += preg_match('/(\.\.%2f)+/i', $val);
|
||||||
}
|
}
|
||||||
|
// For XSS Injection done by closing textarea to exucute content into a textarea field
|
||||||
|
$inj += preg_match('/<\/textarea/i', $val);
|
||||||
// For XSS Injection done by adding javascript with script
|
// For XSS Injection done by adding javascript with script
|
||||||
// This is all cases a browser consider text is javascript:
|
// This is all cases a browser consider text is javascript:
|
||||||
// When it found '<script', 'javascript:', '<style', 'onload\s=' on body tag, '="&' on a tag size with old browsers
|
// When it found '<script', 'javascript:', '<style', 'onload\s=' on body tag, '="&' on a tag size with old browsers
|
||||||
|
|||||||
Reference in New Issue
Block a user