From e5edc6f750dcc0c2070290fff8a49bd3d450ec99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Wed, 2 Aug 2023 15:47:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E5=AF=8C=E6=96=87=E6=9C=AC=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E9=BB=98=E8=AE=A4=E5=AF=B9=20XSS=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/crud/Crud.php | 2 +- app/admin/controller/routine/Config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/controller/crud/Crud.php b/app/admin/controller/crud/Crud.php index 51353bc9..fad5b4c0 100644 --- a/app/admin/controller/crud/Crud.php +++ b/app/admin/controller/crud/Crud.php @@ -742,7 +742,7 @@ class Crud extends Backend { if ($field['designType'] == 'editor') { $this->formVueData['bigDialog'] = 'true'; // form 使用较宽的 Dialog - $this->controllerData['filterRule'] = "\n" . Helper::tab(2) . '$this->request->filter(\'trim,htmlspecialchars\');';// 修改变量过滤规则 + $this->controllerData['filterRule'] = "\n" . Helper::tab(2) . '$this->request->filter(\'clean_xss\');';// 修改变量过滤规则 } // 默认排序字段 diff --git a/app/admin/controller/routine/Config.php b/app/admin/controller/routine/Config.php index fc6c0355..cf6900e3 100644 --- a/app/admin/controller/routine/Config.php +++ b/app/admin/controller/routine/Config.php @@ -62,7 +62,7 @@ class Config extends Backend $all = $this->model->select(); foreach ($all as $item) { if ($item['type'] == 'editor') { - $this->request->filter('trim,htmlspecialchars'); + $this->request->filter('clean_xss'); break; } }