Prevent users disabling MFA when it is enforced
This commit is contained in:
@@ -261,6 +261,13 @@ if (isset($_POST['enable_mfa'])) {
|
|||||||
|
|
||||||
if (isset($_GET['disable_mfa'])){
|
if (isset($_GET['disable_mfa'])){
|
||||||
|
|
||||||
|
if ($session_user_config_force_mfa) {
|
||||||
|
$_SESSION['alert_type'] = "error";
|
||||||
|
$_SESSION['alert_message'] = "Multi-Factor authentication cannot be disabled for your account";
|
||||||
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
// CSRF Check
|
// CSRF Check
|
||||||
validateCSRFToken($_GET['csrf_token']);
|
validateCSRFToken($_GET['csrf_token']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user