diff --git a/crmeb/app/adminapi/controller/Login.php b/crmeb/app/adminapi/controller/Login.php index ca0846102..2155c1206 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', @@ -103,15 +101,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;