diff options
author | Sandro Lutz <sandro.lutz@temparus.ch> | 2017-02-07 00:12:45 +0100 |
---|---|---|
committer | Sandro Lutz <sandro.lutz@temparus.ch> | 2017-02-07 00:15:30 +0100 |
commit | fa1d607bfa951711a2c358f889db56962c179153 (patch) | |
tree | 904b6bd3b7f9d2ed133f64da22b3fb9bbfbf1842 /lib/private/User/Session.php | |
parent | ff3fa538e43bb38a5ff142b07216b9de79645c01 (diff) | |
parent | b55f5af7eaab6f827989407fa7b8d51cbb877eab (diff) | |
download | nextcloud-server-fa1d607bfa951711a2c358f889db56962c179153.tar.gz nextcloud-server-fa1d607bfa951711a2c358f889db56962c179153.zip |
Merge remote-tracking branch 'nextcloud/master'
Signed-off-by: Sandro Lutz <sandro.lutz@temparus.ch>
Diffstat (limited to 'lib/private/User/Session.php')
-rw-r--r-- | lib/private/User/Session.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 36bd45521cf..2ebe895a592 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -317,7 +317,7 @@ class Session implements IUserSession, Emitter { $password, IRequest $request, OC\Security\Bruteforce\Throttler $throttler) { - $currentDelay = $throttler->sleepDelay($request->getRemoteAddress()); + $currentDelay = $throttler->sleepDelay($request->getRemoteAddress(), 'login'); if ($this->manager instanceof PublicEmitter) { $this->manager->emit('\OC\User', 'preLogin', array($user, $password)); @@ -338,7 +338,7 @@ class Session implements IUserSession, Emitter { $throttler->registerAttempt('login', $request->getRemoteAddress(), ['uid' => $user]); if($currentDelay === 0) { - $throttler->sleepDelay($request->getRemoteAddress()); + $throttler->sleepDelay($request->getRemoteAddress(), 'login'); } return false; } @@ -744,6 +744,7 @@ class Session implements IUserSession, Emitter { //login $this->setUser($user); + $this->setLoginName($this->tokenProvider->getToken($sessionId)->getLoginName()); $user->updateLastLoginTimestamp(); $this->manager->emit('\OC\User', 'postRememberedLogin', [$user]); return true; @@ -768,7 +769,7 @@ class Session implements IUserSession, Emitter { try { $this->tokenProvider->invalidateToken($this->session->getId()); } catch (SessionNotAvailableException $ex) { - + } } $this->setUser(null); |