From 868752d246cea42ab5f9289cf29271c5cc1b4a7c Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 26 Oct 2021 14:14:55 +0900 Subject: [PATCH] =?UTF-8?q?`"=20(onmouse|onload|onerror|onclick)***=3D"***?= =?UTF-8?q?`=20=E3=81=AE=E3=83=91=E3=82=BF=E3=83=BC=E3=83=B3=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/smarty_extends/modifier.script_escape.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/smarty_extends/modifier.script_escape.php b/data/smarty_extends/modifier.script_escape.php index a84374bdde..92e7ee1bf1 100644 --- a/data/smarty_extends/modifier.script_escape.php +++ b/data/smarty_extends/modifier.script_escape.php @@ -9,7 +9,7 @@ function smarty_modifier_script_escape($value) { if (is_array($value)) return $value; - $pattern = "/|<\/script>|javascript:|||||||<.*onmouse.*?>/i"; + $pattern = "/|<\/script>|javascript:|||||||<.*onmouse.*?>|(\"|').*(onmouse|onerror|onload|onclick).*=.*(\"|').*/i"; $convert = '#script tag escaped#'; if (preg_match_all($pattern, $value, $matches)) {