From 2db893e80223593535be5f6ef574c8a41d57d04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AF=9B=E7=BA=BF?= <13816653+maoxian-1@users.noreply.github.com> Date: Fri, 1 Apr 2022 14:07:08 +0800 Subject: [PATCH] Update install.php (#1357) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复宝塔面板的网站目录带.导致db路径校验不通过的问题 --- install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.php b/install.php index 3b193996..7b3b5e46 100644 --- a/install.php +++ b/install.php @@ -1022,7 +1022,7 @@ function install_step_2_perform() $error = (new \Typecho\Validate()) ->addRule('dbFile', 'required', _t('确认您的配置')) ->addRule('dbFile', function (string $path) { - return !!preg_match("/^(\/[_a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i", $path); + return !!preg_match("/^(\/[._a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i", $path); }, _t('确认您的配置')) ->run($config); break;