Skip to content

Commit 62d6e37

Browse files
committed
Merge remote-tracking branch 'upstream/5.3-dev' into 5.4-upmerge-2025-04-08
2 parents e2f0709 + e70b2c7 commit 62d6e37

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

libraries/src/Application/MultiFactorAuthenticationHandler.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,6 @@ private function needsMultiFactorAuthenticationRedirection(): bool
271271
return false;
272272
}
273273

274-
// Do not redirect if we are already in a MFA management or captive page
275-
if ($this->isMultiFactorAuthenticationPage()) {
276-
return false;
277-
}
278-
279274
$option = strtolower($this->input->getCmd('option', ''));
280275
$task = strtolower($this->input->getCmd('task', ''));
281276

@@ -294,6 +289,13 @@ private function needsMultiFactorAuthenticationRedirection(): bool
294289
return false;
295290
}
296291

292+
// Do not redirect if we are already in a MFA management or captive page
293+
$onlyCaptive = $this->isMultiFactorAuthenticationPending() && !$isMFASetupMandatory;
294+
295+
if ($this->isMultiFactorAuthenticationPage($onlyCaptive)) {
296+
return false;
297+
}
298+
297299
return true;
298300
}
299301

0 commit comments

Comments
 (0)