Просмотр исходного кода

Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

From-wh 2 лет назад
Родитель
Сommit
e68f133cd5

+ 1 - 12
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);
         }

+ 1 - 3
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;