From 4b605410927e44fbbc25b197be96d391c0b604bf Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 17 Apr 2019 12:33:59 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Plugs.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/admin/controller/Plugs.php b/application/admin/controller/Plugs.php index 9a894d9b8..6817f089e 100644 --- a/application/admin/controller/Plugs.php +++ b/application/admin/controller/Plugs.php @@ -55,7 +55,13 @@ class Plugs extends BasicAdmin */ public function upload() { + if (!session('user')) { + $this->error('只有登录后才能上传文件哦!'); + } $file = $this->request->file('file'); + if ($file->checkExt('php')) { + $this->error('可执行文件禁止上传到本地服务器!'); + } if (!$file->checkExt(strtolower(sysconf('storage_local_exts')))) { return json(['code' => 'ERROR', 'msg' => '文件上传类型受限']); }