mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
@@ -367,6 +367,9 @@ class Admin
|
|||||||
$ipKey = Uri::ip();
|
$ipKey = Uri::ip();
|
||||||
$redirect = isset($post['redirect']) ? $post['redirect'] : $this->base . $this->route;
|
$redirect = isset($post['redirect']) ? $post['redirect'] : $this->base . $this->route;
|
||||||
|
|
||||||
|
// Pseudonymization of the IP
|
||||||
|
$ipKey = sha1($ipKey . $this->grav['config']->get('security.salt'));
|
||||||
|
|
||||||
// Check if the current IP has been used in failed login attempts.
|
// Check if the current IP has been used in failed login attempts.
|
||||||
$attempts = count($rateLimiter->getAttempts($ipKey, 'ip'));
|
$attempts = count($rateLimiter->getAttempts($ipKey, 'ip'));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user