diff --git a/check_login.php b/check_login.php index bd9570df..36cd2b34 100644 --- a/check_login.php +++ b/check_login.php @@ -54,7 +54,7 @@ $row = mysqli_fetch_array($sql); $session_name = sanitizeInput($row['user_name']); $session_email = $row['user_email']; $session_avatar = $row['user_avatar']; -$session_token = $row['user_token']; +$session_token = $row['user_token']; // MFA Token $session_user_role = intval($row['user_role']); $session_user_role_display = sanitizeInput($row['user_role_name']); if (isset($row['user_role_is_admin']) && $row['user_role_is_admin'] == 1) { @@ -128,8 +128,3 @@ $session_mobile = isMobile(); $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('notification_id') AS num FROM notifications WHERE (notification_user_id = $session_user_id OR notification_user_id = 0) AND notification_dismissed_at IS NULL")); $num_notifications = $row['num']; - -// FORCE MFA Setup -//if ($session_user_config_force_mfa == 1 && $session_token == NULL) { -// header("Location: force_mfa.php"); -//} diff --git a/login.php b/login.php index 901ccab0..89d6a673 100644 --- a/login.php +++ b/login.php @@ -145,7 +145,7 @@ if (isset($_POST['login'])) { // Validate MFA code if (!empty($current_code) && TokenAuth6238::verify($token, $current_code)) { $mfa_is_complete = true; - $extended_log = 'with 2FA'; + $extended_log = 'with MFA'; } if ($mfa_is_complete) { @@ -201,8 +201,8 @@ if (isset($_POST['login'])) { // Forcing MFA if ($force_mfa == 1 && $token == NULL) { - $secretMFA = key32gen(); - $config_start_page = "post.php?enable_2fa_force&token=$secretMFA&csrf_token=$_SESSION[csrf_token]"; + //$secretMFA = key32gen(); + $config_start_page = "mfa_enforcement.php"; } // Setup encryption session key diff --git a/mfa_enforcement.php b/mfa_enforcement.php new file mode 100644 index 00000000..d0ad779c --- /dev/null +++ b/mfa_enforcement.php @@ -0,0 +1,196 @@ + + + + +
+ + + + + +