mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10212] Return a CAPTCHA on incorrect username for ip limited users too
PHPBB3-10212
This commit is contained in:
parent
d16b160d5c
commit
768932a3f2
1 changed files with 10 additions and 1 deletions
|
@ -107,6 +107,15 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||||
|
|
||||||
if (!$row)
|
if (!$row)
|
||||||
{
|
{
|
||||||
|
if ($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max'])
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'status' => LOGIN_ERROR_ATTEMPTS,
|
||||||
|
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
|
||||||
|
'user_row' => array('user_id' => ANONYMOUS),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'status' => LOGIN_ERROR_USERNAME,
|
'status' => LOGIN_ERROR_USERNAME,
|
||||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||||
|
@ -264,4 +273,4 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue