From ae4fe72d17ba4ab24172509f1219bea2f049835c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 9 Jul 2003 21:48:13 +0000 Subject: - Changed the XSS check a little to be slightly more forgiving wrt style attributes. --- includes/common.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index 87ab7640c..448cf5f09 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -484,8 +484,8 @@ function xss_check_input_data($data) { */ // check attributes: - $match = preg_match("/\W(style|dynsrc|datasrc|data|lowsrc|on[a-z]+)\s*=[^>]+?>/i", $data); - $match += preg_match("/\W(src|href)\s*=[\s'\"]*javascript[^>]+?>/i", $data); + $match = preg_match("/\W(dynsrc|datasrc|data|lowsrc|on[a-z]+)\s*=[^>]+?>/i", $data); + $match += preg_match("/\Wjavascript\s*:/i", $data); // check tags: $match += preg_match("/<\s*(applet|script|object|style|embed|form|blink|meta|html|frame|iframe|layer|ilayer|head|frameset|xml)/i", $data); -- cgit v1.2.3