From c1b6fb2720ded0aaaa5f19ea567c35f1a5e31e74 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Thu, 18 May 2023 09:09:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8E=89=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/Login.php | 13 +------------ .../services/system/admin/SystemAdminServices.php | 4 +--- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/crmeb/app/adminapi/controller/Login.php b/crmeb/app/adminapi/controller/Login.php index e3e9d877a..4ad5aa78a 100644 --- a/crmeb/app/adminapi/controller/Login.php +++ b/crmeb/app/adminapi/controller/Login.php @@ -11,11 +11,9 @@ namespace app\adminapi\controller; use crmeb\services\CacheService; -use crmeb\utils\Rsa; use think\facade\App; use crmeb\utils\Captcha; use app\services\system\admin\SystemAdminServices; -use think\facade\Cache; /** * 后台登陆 @@ -85,7 +83,7 @@ class Login extends AuthController * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ - public function login(Rsa $rsa) + public function login() { [$account, $password, $key, $captchaVerification, $captchaType] = $this->request->postMore([ 'account', @@ -104,15 +102,6 @@ class Login extends AuthController } } - try { - if (strlen(trim($password)) > 500) { - return app('json')->fail(400762); - } - $password = $rsa->privateDecrypt($password); - } catch (\Throwable $e) { - return app('json')->fail($e->getMessage()); - } - if (strlen(trim($password)) < 6 || strlen(trim($password)) > 32) { return app('json')->fail(400762); } diff --git a/crmeb/app/services/system/admin/SystemAdminServices.php b/crmeb/app/services/system/admin/SystemAdminServices.php index de07b3bcd..0cacdc8bc 100644 --- a/crmeb/app/services/system/admin/SystemAdminServices.php +++ b/crmeb/app/services/system/admin/SystemAdminServices.php @@ -23,7 +23,6 @@ use app\services\system\SystemMenusServices; use crmeb\services\CacheService; use crmeb\services\FormBuilder; use crmeb\services\workerman\ChannelService; -use crmeb\utils\Rsa; use think\facade\Config; use think\facade\Event; use think\Model; @@ -168,8 +167,7 @@ class SystemAdminServices extends BaseServices 'copyright' => sys_config('nncnL_crmeb_copyright', ''), 'version' => get_crmeb_version(), 'key' => $key, - 'login_captcha' => 0, - 'publicKey' => app()->make(Rsa::class)->getPublicKey() + 'login_captcha' => 0 ]; if (CacheService::get('login_captcha', 1) > 1) { $data['login_captcha'] = 1;