Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-04-03 23:51:46 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-04-03 23:51:46 +0300
commite52442e26f475213dfb7591fb0df1d3c516fbd51 (patch)
treed55f8e61c931743126dad4a8ef678ee6099cb9ce /lib
parent2d0f29f208a20a76fc52cc07dce05f36de8edbb6 (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
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();