From 00d5cff00dcb03949948d494573b119b23f22f0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Sep 2019 14:44:31 +0200 Subject: [PATCH] Fix XSS injection into textarea --- htdocs/main.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c99723684bf..14b1d581986 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -116,6 +116,8 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/union.+select/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 // This is all cases a browser consider text is javascript: // When it found '