From c5fc1382003dc430e10c92b7e57bb22daabfbf84 Mon Sep 17 00:00:00 2001 From: unset Date: Fri, 20 Jul 2018 14:25:04 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9C=9F=E5=AE=9E?= =?UTF-8?q?=E7=B1=BB=E5=BA=93=E5=8C=B9=E9=85=8D=E8=A7=84=E5=88=99:?= =?UTF-8?q?=E7=B1=BB=E5=BA=93=E5=90=8D=E5=85=81=E8=AE=B8=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E4=B8=8B=E5=88=92=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/InterfaceList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/controller/InterfaceList.php b/application/admin/controller/InterfaceList.php index 8785614..d8a7dc4 100644 --- a/application/admin/controller/InterfaceList.php +++ b/application/admin/controller/InterfaceList.php @@ -73,7 +73,7 @@ class InterfaceList extends Base { */ public function add() { $postData = $this->request->post(); - if (!preg_match("/^[A-Za-z0-9\/]+$/", $postData['apiClass'])) { + if (!preg_match("/^[A-Za-z0-9_\/]+$/", $postData['apiClass'])) { return $this->buildFailed(ReturnCode::DB_SAVE_ERROR, '真实类名只允许填写字母,数字和/'); } @@ -114,7 +114,7 @@ class InterfaceList extends Base { */ public function edit() { $postData = $this->request->post(); - if (!preg_match("/^[A-Za-z0-9\/]+$/", $postData['apiClass'])) { + if (!preg_match("/^[A-Za-z0-9_\/]+$/", $postData['apiClass'])) { return $this->buildFailed(ReturnCode::DB_SAVE_ERROR, '真实类名只允许填写字母,数字和/'); } From d48764cc1aa3d7609a1902ac4fc91d2636a9d830 Mon Sep 17 00:00:00 2001 From: unset <193344396@qq.com> Date: Fri, 27 Jul 2018 12:48:44 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93json=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E4=B8=ADdata=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=88=96=E8=80=85data=E5=86=85=E5=AE=B9=E4=B8=BA=E7=A9=BA,hand?= =?UTF-8?q?le=E5=87=BD=E6=95=B0=E4=B8=AD[0]=E6=9C=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=B8=8B=E6=A0=870=E7=9A=84=E9=94=99=E8=AF=AF,=E5=BD=93json?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=B8=ADdata=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=88=96=E8=80=85data=E5=86=85=E5=AE=B9=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA,=E5=88=99=E4=B8=8D=E8=BF=9B=E8=A1=8Chandle=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Fields.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/admin/controller/Fields.php b/application/admin/controller/Fields.php index 3f210e2..754c5ab 100644 --- a/application/admin/controller/Fields.php +++ b/application/admin/controller/Fields.php @@ -167,7 +167,12 @@ class Fields extends Base { return $this->buildFailed(ReturnCode::EXCEPTION, 'JSON数据格式有误'); } AdminList::update(['returnStr' => json_encode($data)], ['hash' => $hash]); - $this->handle($data['data'], $dataArr); + //如果json字符串中data不存在或者data内容为空,则不进行handle处理 + if(!isset($data['data']) || sizeof($data['data']) == 0){ + $dataArr = []; + }else{ + $this->handle($data['data'], $dataArr); + } $old = (new AdminFields())->where([ 'hash' => $hash, 'type' => $type From 9625a514281b413f5f107203d6ada1326aa83b97 Mon Sep 17 00:00:00 2001 From: unset <193344396@qq.com> Date: Fri, 27 Jul 2018 16:20:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Fields.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/application/admin/controller/Fields.php b/application/admin/controller/Fields.php index 754c5ab..3f210e2 100644 --- a/application/admin/controller/Fields.php +++ b/application/admin/controller/Fields.php @@ -167,12 +167,7 @@ class Fields extends Base { return $this->buildFailed(ReturnCode::EXCEPTION, 'JSON数据格式有误'); } AdminList::update(['returnStr' => json_encode($data)], ['hash' => $hash]); - //如果json字符串中data不存在或者data内容为空,则不进行handle处理 - if(!isset($data['data']) || sizeof($data['data']) == 0){ - $dataArr = []; - }else{ - $this->handle($data['data'], $dataArr); - } + $this->handle($data['data'], $dataArr); $old = (new AdminFields())->where([ 'hash' => $hash, 'type' => $type From fd954a924ef3b5b602a27b9ed24712be3488b087 Mon Sep 17 00:00:00 2001 From: unset <193344396@qq.com> Date: Fri, 27 Jul 2018 16:24:19 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BC=98=E5=8C=96wiki=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA:=E6=8E=A5=E5=8F=A3=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E5=B7=A6=E4=BE=A7=E6=8E=A5=E5=8F=A3=E5=AF=BC=E8=88=AA?= =?UTF-8?q?,=E5=88=A0=E9=99=A4=E4=BA=86hash=E5=AD=97=E7=AC=A6=E4=B8=B2,?= =?UTF-8?q?=E5=8F=AA=E6=98=BE=E7=A4=BA=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wiki/view/index/detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/wiki/view/index/detail.html b/application/wiki/view/index/detail.html index fa0ef69..5ab0c63 100644 --- a/application/wiki/view/index/detail.html +++ b/application/wiki/view/index/detail.html @@ -37,7 +37,7 @@