From c79fdd579e3b87c96692ff1924dac324fa60d7bd Mon Sep 17 00:00:00 2001 From: Karson Date: Thu, 11 Apr 2024 10:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=83=E8=AF=95=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=20$key=20=E6=9C=AA=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=BC=82=E5=B8=B8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?XSS=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tpl/think_exception.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl index 21bbafc3..d5bd5bf1 100644 --- a/tpl/think_exception.tpl +++ b/tpl/think_exception.tpl @@ -68,7 +68,7 @@ break; } - $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; + $result[] = is_int($key) ? $value : sprintf('\'%s\' => %s', htmlentities($key), $value); } return implode(', ', $result);