MDL-86334 tool_mfa: Improve multi-factor authentication validation.

This commit is contained in:
raortegar
2025-10-01 01:30:20 +00:00
committed by Jenkins
parent beb129d286
commit 519a09da8b
+1 -4
View File
@@ -532,11 +532,8 @@ class manager {
}
// WS/AJAX check.
// Prevents any potential bypassing of multi-factor authentication.
if (WS_SERVER || AJAX_SCRIPT) {
if (isset($SESSION->mfa_pending) && !empty($SESSION->mfa_pending)) {
// Allow AJAX and WS, but never from auth.php.
return self::NO_REDIRECT;
}
return self::REDIRECT_EXCEPTION;
}