From 8757edc4097560ef9ad9e41245cea6da9b4e1cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 12 May 2021 17:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index 423cfde9a..2036ad06c 100644 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -94,7 +94,7 @@ class Config extends Controller if (!empty($post['storage']['allow_exts'])) { $deny = ['sh', 'asp', 'bat', 'cmd', 'exe', 'php']; $exts = array_unique(str2arr(strtolower($post['storage']['allow_exts']))); - if (array_intersect($deny, $exts)) $this->error('禁止上传可执行的文件!'); + if (count(array_intersect($deny, $exts)) > 0) $this->error('禁止上传可执行的文件!'); $post['storage']['allow_exts'] = join(',', $exts); } foreach ($post as $name => $value) sysconf($name, $value);