From 5e0b2b940e7eaf39e44857debe3f2044e1596237 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 22 May 2023 09:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E5=AF=86=E7=A0=81=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/admin/SystemAdminServices.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crmeb/app/services/system/admin/SystemAdminServices.php b/crmeb/app/services/system/admin/SystemAdminServices.php index 0cacdc8bc..8e2efbc68 100644 --- a/crmeb/app/services/system/admin/SystemAdminServices.php +++ b/crmeb/app/services/system/admin/SystemAdminServices.php @@ -257,6 +257,10 @@ class SystemAdminServices extends BaseServices } unset($data['conf_pwd']); + if (strlen(trim($data['pwd'])) < 6 || strlen(trim($data['pwd'])) > 32) { + return app('json')->fail(400762); + } + if ($this->dao->count(['account' => $data['account'], 'is_del' => 0])) { throw new AdminException(400596); } @@ -319,6 +323,11 @@ class SystemAdminServices extends BaseServices if ($data['conf_pwd'] != $data['pwd']) { throw new AdminException(400264); } + + if (strlen(trim($data['pwd'])) < 6 || strlen(trim($data['pwd'])) > 32) { + return app('json')->fail(400762); + } + $adminInfo->pwd = $this->passwordHash($data['pwd']); } //修改账号