mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 23:40:38 +00:00
优化漏洞
This commit is contained in:
parent
956ab1eda1
commit
a05e30a8d5
@ -53,10 +53,12 @@ class LoginController
|
||||
[$account, $password, $spread] = $request->postMore([
|
||||
'account', 'password', 'spread'
|
||||
], true);
|
||||
TaskJob::dispatch('emptyYesterdayAttachment');
|
||||
if (!$account || !$password) {
|
||||
return app('json')->fail(410000);
|
||||
}
|
||||
if (count($password) > 32 || count($password) < 6) {
|
||||
return app('json')->fail(400762);
|
||||
}
|
||||
return app('json')->success(410001, $this->services->login($account, $password, $spread));
|
||||
}
|
||||
|
||||
@ -193,6 +195,9 @@ class LoginController
|
||||
} catch (ValidateException $e) {
|
||||
return app('json')->fail($e->getError());
|
||||
}
|
||||
if (count($password) > 32 || count($password) < 6) {
|
||||
return app('json')->fail(400762);
|
||||
}
|
||||
$verifyCode = CacheService::get('code_' . $account);
|
||||
if (!$verifyCode)
|
||||
return app('json')->fail(410009);
|
||||
@ -226,6 +231,9 @@ class LoginController
|
||||
} catch (ValidateException $e) {
|
||||
return app('json')->fail($e->getError());
|
||||
}
|
||||
if (count($password) > 32 || count($password) < 6) {
|
||||
return app('json')->fail(400762);
|
||||
}
|
||||
$verifyCode = CacheService::get('code_' . $account);
|
||||
if (!$verifyCode)
|
||||
return app('json')->fail(410009);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user