aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-03-18 09:49:27 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-03-18 09:16:58 +0000
commit90fff7d6cc58f1c02df7462b5743be65bc804291 (patch)
treed6ea4e11767e8defcc575c91905de8656d238113
parent561775d2fee7c9e1b3b34b7a21bd747554f6a83e (diff)
downloadnextcloud-server-90fff7d6cc58f1c02df7462b5743be65bc804291.tar.gz
nextcloud-server-90fff7d6cc58f1c02df7462b5743be65bc804291.zip
fix(auth): Allow 2FA challenges for Ephemeral sessionsbackport/51544/stable31
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php
index d5c73b1f598..c30855a0e98 100644
--- a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php
+++ b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php
@@ -9,6 +9,7 @@ namespace OC\AppFramework\Middleware;
use OC\AppFramework\Utility\ControllerMethodReflector;
use OC\Core\Controller\ClientFlowLoginV2Controller;
+use OC\Core\Controller\TwoFactorChallengeController;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Middleware;
@@ -38,6 +39,10 @@ class FlowV2EphemeralSessionsMiddleware extends Middleware {
return;
}
+ if ($controller instanceof TwoFactorChallengeController) {
+ return;
+ }
+
$reflectionMethod = new ReflectionMethod($controller, $methodName);
if (!empty($reflectionMethod->getAttributes(PublicPage::class))) {
return;