Merge branch 'develop' into 1.9

This commit is contained in:
Andy Miller
2019-01-14 18:13:23 -07:00
4 changed files with 23 additions and 1 deletions

View File

@@ -372,6 +372,9 @@ class Admin
$ipKey = Uri::ip();
$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'));