diff --git a/classes/admin.php b/classes/admin.php index 24692a79..181e8e2a 100644 --- a/classes/admin.php +++ b/classes/admin.php @@ -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'));