From 6f9b4db3676a2f15349178def811df5ff52cd19f Mon Sep 17 00:00:00 2001 From: tensent Date: Tue, 14 Apr 2020 15:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=89=E8=A3=85=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.php | 2 +- public/install.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index badb14ec..ef8d2870 100755 --- a/public/index.php +++ b/public/index.php @@ -17,7 +17,7 @@ require __DIR__ . '/../vendor/autoload.php'; $app = new App(); if (!is_file($app->getRootPath() . '.env') || !is_file($app->getRootPath() . 'install.lock')) { - header('Location: install.php');exit(); + header('Location: /install.php');exit(); } // 执行HTTP应用并响应 diff --git a/public/install.php b/public/install.php index 59be47c9..b961e7cd 100644 --- a/public/install.php +++ b/public/install.php @@ -55,6 +55,9 @@ if ($action == 'index') { if (!$dbc) { echo json_encode(['code'=>0,'msg'=>'请填写完系统配置信息!']);exit(); } + if ($data['admin']['password'] !== $data['admin']['repassword']) { + echo json_encode(['code'=>0,'msg'=>'管理员密码错误']);exit(); + } $info = str_replace("{secret}", \xin\helper\Str::random(32), $info); file_put_contents(ROOT_PATH . '.env', $info); session('database_info', $data['database']);