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

This commit is contained in:
From-wh 2023-05-18 09:53:26 +08:00
commit e68f133cd5
2 changed files with 2 additions and 15 deletions

View File

@ -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);
}

View File

@ -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;