Add check if UserManager is of type PublicEmitter before calling preLogin hook
Signed-off-by: Sandro Lutz <sandro.lutz@temparus.ch>
This commit is contained in:
parent
e30d28f7eb
commit
6feff0ceba
|
@ -215,7 +215,9 @@ class LoginController extends Controller {
|
|||
return $this->generateRedirect($redirect_url);
|
||||
}
|
||||
|
||||
if ($this->manager instanceof PublicEmitter) {
|
||||
$this->userManager->emit('\OC\User', 'preLogin', array($user, $password));
|
||||
}
|
||||
|
||||
$originalUser = $user;
|
||||
// TODO: Add all the insane error handling
|
||||
|
|
|
@ -319,7 +319,9 @@ class Session implements IUserSession, Emitter {
|
|||
OC\Security\Bruteforce\Throttler $throttler) {
|
||||
$currentDelay = $throttler->sleepDelay($request->getRemoteAddress());
|
||||
|
||||
if ($this->manager instanceof PublicEmitter) {
|
||||
$this->manager->emit('\OC\User', 'preLogin', array($user, $password));
|
||||
}
|
||||
|
||||
$isTokenPassword = $this->isTokenPassword($password);
|
||||
if (!$isTokenPassword && $this->isTokenAuthEnforced()) {
|
||||
|
|
Loading…
Reference in New Issue