|
@@ -98,7 +98,7 @@ function authenticate_user(){
|
|
|
if ($data[$_POST['user']]['TWOFA'] != '') {
|
|
if ($data[$_POST['user']]['TWOFA'] != '') {
|
|
|
if (empty($_POST['twofa'])){
|
|
if (empty($_POST['twofa'])){
|
|
|
return false;
|
|
return false;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
$v_twofa = $_POST['twofa'];
|
|
$v_twofa = $_POST['twofa'];
|
|
|
exec(HESTIA_CMD ."v-check-user-2fa ".$v_user." ".$v_twofa, $output, $return_var);
|
|
exec(HESTIA_CMD ."v-check-user-2fa ".$v_user." ".$v_twofa, $output, $return_var);
|
|
|
unset($output);
|
|
unset($output);
|
|
@@ -148,6 +148,13 @@ function authenticate_user(){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ unset($_POST);
|
|
|
|
|
+ unset($_GET);
|
|
|
|
|
+ unset($_SESSION);
|
|
|
|
|
+ session_destroy();
|
|
|
|
|
+ session_start();
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -190,4 +197,4 @@ if (empty($_POST['user'])) {
|
|
|
} else {
|
|
} else {
|
|
|
require_once('../templates/login.html');
|
|
require_once('../templates/login.html');
|
|
|
}
|
|
}
|
|
|
-?>
|
|
|
|
|
|
|
+?>
|