Merge pull request #13367 from nextcloud/fix/13202/throttle_with_correct_metadata

Throttle with correct metadata
This commit is contained in:
Roeland Jago Douma 2019-01-04 22:21:01 +01:00 committed by GitHub
commit 40e3a7bbcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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');
} }