|
|
|
|
@ -319,6 +319,8 @@ class Session implements IUserSession, Emitter { |
|
|
|
|
OC\Security\Bruteforce\Throttler $throttler) { |
|
|
|
|
$currentDelay = $throttler->sleepDelay($request->getRemoteAddress()); |
|
|
|
|
|
|
|
|
|
$this->manager->emit('\OC\User', 'preLogin', array($user, $password)); |
|
|
|
|
|
|
|
|
|
$isTokenPassword = $this->isTokenPassword($password); |
|
|
|
|
if (!$isTokenPassword && $this->isTokenAuthEnforced()) { |
|
|
|
|
throw new PasswordLoginForbiddenException(); |
|
|
|
|
@ -463,7 +465,6 @@ class Session implements IUserSession, Emitter { |
|
|
|
|
* @throws LoginException if an app canceld the login process or the user is not enabled |
|
|
|
|
*/ |
|
|
|
|
private function loginWithPassword($uid, $password) { |
|
|
|
|
$this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); |
|
|
|
|
$user = $this->manager->checkPassword($uid, $password); |
|
|
|
|
if ($user === false) { |
|
|
|
|
// Password check failed |
|
|
|
|
@ -513,8 +514,6 @@ class Session implements IUserSession, Emitter { |
|
|
|
|
// Ignore and use empty string instead |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); |
|
|
|
|
|
|
|
|
|
$user = $this->manager->get($uid); |
|
|
|
|
if (is_null($user)) { |
|
|
|
|
// user does not exist |
|
|
|
|
|