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");