From 3b9990c43f0951674b1c8bc1dd05ac0419f1e63c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 10 Feb 2014 09:23:26 +0200 Subject: CI_Security: Expect a backslash as a tag separator --- system/core/Security.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/core/Security.php b/system/core/Security.php index 93e6a3ba5..062c828a7 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -450,12 +450,12 @@ class CI_Security { if (preg_match('/]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); + $str = preg_replace_callback('#]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); } if (preg_match('/]*?)(?:\s?/?>|$)#si', array($this, '_js_img_removal'), $str); + $str = preg_replace_callback('#]*?)(?:\s?/?>|$)#si', array($this, '_js_img_removal'), $str); } if (preg_match('/script|xss/i', $str)) -- cgit v1.2.3-24-g4f1b