diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-04-03 22:51:46 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-04-03 22:51:46 +0200 |
commit | e52442e26f475213dfb7591fb0df1d3c516fbd51 (patch) | |
tree | d55f8e61c931743126dad4a8ef678ee6099cb9ce | |
parent | 2d0f29f208a20a76fc52cc07dce05f36de8edbb6 (diff) | |
download | nextcloud-server-e52442e26f475213dfb7591fb0df1d3c516fbd51.tar.gz nextcloud-server-e52442e26f475213dfb7591fb0df1d3c516fbd51.zip |
fixes the throttler not checking the user state on postLogin
a listener to the post login events can still reject a login, so that a
user is not necessarily available at the time.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r-- | lib/base.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 4c96e3470cd..6dc5948d53c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -812,7 +812,7 @@ class OC { // NOTE: This will be replaced to use OCP $userSession = self::$server->getUserSession(); $userSession->listen('\OC\User', 'postLogin', function () use ($userSession) { - if (!defined('PHPUNIT_RUN')) { + if (!defined('PHPUNIT_RUN') && $userSession->isLoggedIn()) { // reset brute force delay for this IP address and username $uid = \OC::$server->getUserSession()->getUser()->getUID(); $request = \OC::$server->getRequest(); |