Merge pull request #20299 from nextcloud/fix/noid/member-on-null-app-cancel-login

fixes the throttler not checking the user state on postLogin
This commit is contained in:
Roeland Jago Douma 2020-04-08 14:50:46 +02:00 committed by GitHub
commit 4e0ba3e6be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();