Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use handleLoginFailed for invalid email address
Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb committed Jul 10, 2023
commit b2776bf58628d22b4555eb3bacd93ae1c616fce2
10 changes: 1 addition & 9 deletions lib/private/User/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,7 @@ public function logClientIn($user,
}
$users = $this->manager->getByEmail($user);
if (!(\count($users) === 1 && $this->login($users[0]->getUID(), $password))) {
$this->logger->warning('Login failed: \'' . $user . '\' (Remote IP: \'' . \OC::$server->getRequest()->getRemoteAddress() . '\')', ['app' => 'core']);

$throttler->registerAttempt('login', $request->getRemoteAddress(), ['user' => $user]);

$this->dispatcher->dispatchTyped(new OC\Authentication\Events\LoginFailed($user));

if ($currentDelay === 0) {
$throttler->sleepDelay($request->getRemoteAddress(), 'login');
}
$this->handleLoginFailed($throttler, $currentDelay, $remoteAddress, $user, $password);
return false;
}
}
Expand Down