Skip to content

Commit 4e0ba3e

Browse files
authored
Merge pull request #20299 from nextcloud/fix/noid/member-on-null-app-cancel-login
fixes the throttler not checking the user state on postLogin
2 parents 547ba64 + e52442e commit 4e0ba3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ public static function registerCleanupHooks() {
812812
// NOTE: This will be replaced to use OCP
813813
$userSession = self::$server->getUserSession();
814814
$userSession->listen('\OC\User', 'postLogin', function () use ($userSession) {
815-
if (!defined('PHPUNIT_RUN')) {
815+
if (!defined('PHPUNIT_RUN') && $userSession->isLoggedIn()) {
816816
// reset brute force delay for this IP address and username
817817
$uid = \OC::$server->getUserSession()->getUser()->getUID();
818818
$request = \OC::$server->getRequest();

0 commit comments

Comments
 (0)