From eaa9d51f017957ee91abdcfdbf38341313e4708b Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 28 Jul 2021 18:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E6=8A=93=E5=8F=96=E8=BF=9C=E7=A8=8B=E5=9B=BE=E7=89=87=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/base/Uploader.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extend/base/Uploader.php b/extend/base/Uploader.php index 7a4c15dba..b2b3acc20 100755 --- a/extend/base/Uploader.php +++ b/extend/base/Uploader.php @@ -349,6 +349,12 @@ class Uploader $imgUrl = htmlspecialchars($this->fileField); $imgUrl = str_replace("&", "&", $imgUrl); + //检查是否不允许的文件格式 + if (!$this->checkType()) { + $this->stateInfo = $this->getStateInfo("ERROR_TYPE_NOT_ALLOWED"); + return; + } + //http开头验证 if (strpos($imgUrl, "http") !== 0) { $this->stateInfo = $this->getStateInfo("ERROR_HTTP_LINK"); -- GitLab