Merge pull request #13367 from nextcloud/fix/13202/throttle_with_correct_metadata
Throttle with correct metadata
This commit is contained in:
commit
40e3a7bbcf
|
@ -425,7 +425,7 @@ class Session implements IUserSession, Emitter {
|
||||||
|
|
||||||
$this->logger->warning('Login failed: \'' . $user . '\' (Remote IP: \'' . \OC::$server->getRequest()->getRemoteAddress() . '\')', ['app' => 'core']);
|
$this->logger->warning('Login failed: \'' . $user . '\' (Remote IP: \'' . \OC::$server->getRequest()->getRemoteAddress() . '\')', ['app' => 'core']);
|
||||||
|
|
||||||
$throttler->registerAttempt('login', $request->getRemoteAddress(), ['uid' => $user]);
|
$throttler->registerAttempt('login', $request->getRemoteAddress(), ['user' => $user]);
|
||||||
if ($currentDelay === 0) {
|
if ($currentDelay === 0) {
|
||||||
$throttler->sleepDelay($request->getRemoteAddress(), 'login');
|
$throttler->sleepDelay($request->getRemoteAddress(), 'login');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue