mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: use handleLoginFailed for invalid email address
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
446ebd35a9
commit
b2776bf586
1 changed files with 1 additions and 9 deletions
|
|
@ -458,15 +458,7 @@ class Session implements IUserSession, Emitter {
|
|||
}
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue