From c1f2363de417803cdbe1450f51566f6da3fb7598 Mon Sep 17 00:00:00 2001 From: "525833532@qq.com" Date: Thu, 28 Apr 2022 13:07:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E5=BD=93=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=90=8E=E7=BC=80=E4=B8=BA=E5=A4=A7=E5=86=99=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6=E5=90=8E=E7=BC=80=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=EF=BC=8C=E8=AF=B7=E9=87=8D=E6=96=B0=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/api/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/api/Upload.php b/app/admin/controller/api/Upload.php index 91ee0c840..2f6848580 100644 --- a/app/admin/controller/api/Upload.php +++ b/app/admin/controller/api/Upload.php @@ -116,7 +116,7 @@ class Upload extends Controller $this->error('文件路径不能出现跳级操作!'); } // 检查文件后缀是否被恶意修改 - if (pathinfo(parse_url($saveName, PHP_URL_PATH), PATHINFO_EXTENSION) !== $extension) { + if (strtolower(pathinfo(parse_url($saveName, PHP_URL_PATH), PATHINFO_EXTENSION)) !== $extension) { $this->error('文件后缀异常,请重新上传文件!'); } // 屏蔽禁止上传指定后缀的文件