From e8240fa547ab44cbdaf5b74e627d12a25b84589e Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Thu, 25 Jun 2026 11:14:03 +0530 Subject: [PATCH] revert: remove MFA skip for impersonation (not a regression) --- app/controllers/shared/api.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index a72256e16f..b69fbd86a8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -475,8 +475,7 @@ Http::init() $minimumFactors = ($mfaEnabled && $hasMoreFactors) ? 2 : 1; // Step 13: Handle Multi-Factor Authentication - // Skip MFA check when impersonating — the actor already satisfied their own MFA during login. - if (! in_array('mfa', $route->getGroups()) && $impersonatorUser->isEmpty()) { + if (! in_array('mfa', $route->getGroups())) { if ($session && \count($session->getAttribute('factors', [])) < $minimumFactors) { throw new Exception(Exception::USER_MORE_FACTORS_REQUIRED); }