Skip to content

Commit 83159f8

Browse files
nickvergessenbackportbot[bot]
authored andcommitted
Don't further setup disabled users when logging in with apache
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 6e7ec1d commit 83159f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/legacy/OC_User.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe
171171
if (self::getUser() !== $uid) {
172172
self::setUserId($uid);
173173
$userSession = \OC::$server->getUserSession();
174+
if ($userSession->getUser() && !$userSession->getUser()->isEnabled()) {
175+
$message = \OC::$server->getL10N('lib')->t('User disabled');
176+
throw new LoginException($message);
177+
}
174178
$userSession->setLoginName($uid);
175179
$request = OC::$server->getRequest();
176180
$userSession->createSessionToken($request, $uid, $uid);

0 commit comments

Comments
 (0)