mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-04 20:36:03 +01:00
@@ -367,6 +367,9 @@ class Admin
|
||||
$ipKey = Uri::ip();
|
||||
$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.
|
||||
$attempts = count($rateLimiter->getAttempts($ipKey, 'ip'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user