From ebb1024391552083e40c4fd8c03ef9b9892dfe1d Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 12 May 2020 14:09:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Auth.php | 1 - app/admin/controller/Config.php | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/admin/controller/Auth.php b/app/admin/controller/Auth.php index 7e1c87271..5f8d51c8e 100644 --- a/app/admin/controller/Auth.php +++ b/app/admin/controller/Auth.php @@ -80,7 +80,6 @@ class Auth extends Controller */ public function state() { - $this->_applyFormToken(); $this->_save($this->table, ['status' => input('status')]); } diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index c247b869d..d97c6d293 100644 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -115,13 +115,11 @@ class Config extends Controller $post = $this->request->post(); if (!empty($post['storage']['allow_exts'])) { $exts = array_unique(explode(',', strtolower($post['storage']['allow_exts']))); + if (in_array('php', $exts)) $this->error('禁止上传可执行文件到本地服务器!'); sort($exts); - if (in_array('php', $exts)) { - $this->error('禁止上传可执行文件到本地服务器!'); - } $post['storage']['allow_exts'] = join(',', $exts); } - foreach ($post as $key => $value) sysconf($key, $value); + foreach ($post as $name => $value) sysconf($name, $value); $this->success('修改文件存储成功!'); }