From 804ed56a237cb1f3f9ca10a88fa7a15a3aa87bf6 Mon Sep 17 00:00:00 2001 From: DiscuzX <153619335@qq.com> Date: Sat, 8 May 2021 17:46:45 +0800 Subject: [PATCH] =?UTF-8?q?Discuz!X=E7=B3=BB=E5=88=97=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E4=BB=BB=E6=84=8F=E4=BB=A3=E7=A0=81=E5=86=99?= =?UTF-8?q?=E5=85=A5=E6=BC=8F=E6=B4=9E(utility/update.php)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utility/update.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utility/update.php b/utility/update.php index 326fbded2..7e3161480 100644 --- a/utility/update.php +++ b/utility/update.php @@ -2204,6 +2204,10 @@ function buildarray($array, $level = 0, $pre = '$_config') { } foreach ($array as $key => $val) { + if(!preg_match("/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", $key)) { + continue; + } + if($level == 0) { $newline = str_pad(' CONFIG '.strtoupper($key).' ', 70, '-', STR_PAD_BOTH); $return .= "\r\n// $newline //\r\n"; -- Gitee