From 681558500c40da7f94006b4408b501e94e02cd96 Mon Sep 17 00:00:00 2001 From: Karson Date: Mon, 10 Jul 2023 15:41:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Index.php | 2 +- application/index/controller/User.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index 30dbe525..b68ecae7 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -74,7 +74,7 @@ class Index extends Backend $keeyloginhours = 24; if ($this->request->isPost()) { $username = $this->request->post('username'); - $password = $this->request->post('password'); + $password = $this->request->post('password', '', null); $keeplogin = $this->request->post('keeplogin'); $token = $this->request->post('__token__'); $rule = [ diff --git a/application/index/controller/User.php b/application/index/controller/User.php index 5b4a3e28..d265c852 100644 --- a/application/index/controller/User.php +++ b/application/index/controller/User.php @@ -71,7 +71,7 @@ class User extends Frontend } if ($this->request->isPost()) { $username = $this->request->post('username'); - $password = $this->request->post('password'); + $password = $this->request->post('password', '', null); $email = $this->request->post('email'); $mobile = $this->request->post('mobile', ''); $captcha = $this->request->post('captcha'); @@ -149,7 +149,7 @@ class User extends Frontend } if ($this->request->isPost()) { $account = $this->request->post('account'); - $password = $this->request->post('password'); + $password = $this->request->post('password', '', null); $keeplogin = (int)$this->request->post('keeplogin'); $token = $this->request->post('__token__'); $rule = [ @@ -222,9 +222,9 @@ class User extends Frontend public function changepwd() { if ($this->request->isPost()) { - $oldpassword = $this->request->post("oldpassword"); - $newpassword = $this->request->post("newpassword"); - $renewpassword = $this->request->post("renewpassword"); + $oldpassword = $this->request->post("oldpassword", '', null); + $newpassword = $this->request->post("newpassword", '', null); + $renewpassword = $this->request->post("renewpassword", '', null); $token = $this->request->post('__token__'); $rule = [ 'oldpassword' => 'require|regex:\S{6,30}',