...
|
...
|
@@ -101,8 +101,16 @@ class LoginController extends WebAction |
|
|
$ip = Helpers::getClientIp();
|
|
|
$ipKey = md5('ip_signin_' . $ip);
|
|
|
$accountKey = md5('account_signin_' . $account);
|
|
|
$accountTimes = Cache::increment($accountKey, 1, 0, 1800);
|
|
|
$ipTimes = Cache::increment($ipKey, 1, 0, 3600);
|
|
|
if(!Cache::get($ipKey)){
|
|
|
Cache::set($ipKey, 0);
|
|
|
}
|
|
|
if(!Cache::get($accountKey)){
|
|
|
Cache::set($accountKey, 0);
|
|
|
}
|
|
|
Cache::increment($accountKey, 1, 0, 1800);
|
|
|
Cache::increment($ipKey, 1, 0, 3600);
|
|
|
$accountTimes = Cache::get($accountKey);
|
|
|
$ipTimes = Cache::get($ipKey);
|
|
|
if ($accountTimes > 10) {
|
|
|
$data = array('code' => 400, 'message' => '您输入的密码及账户名不匹配,是否忘记密码?', 'data' => '');
|
|
|
break;
|
...
|
...
|
|