fixing bugs

This commit is contained in:
Janis Steiner
2024-06-26 17:07:58 +02:00
parent 8309840dba
commit 2086ef5891
3 changed files with 0 additions and 7 deletions

View File

@@ -9,7 +9,6 @@
</head> </head>
<body> <body>
<?php <?php
include "../api/php/log/add_server_entry.php"; //to log things
?> ?>
<div class="container mt-5"> <div class="container mt-5">
<div class="row justify-content-center"> <div class="row justify-content-center">

View File

@@ -7,8 +7,6 @@ if(!isset($_SESSION["2fa_auth"])){ //so only someone who has allready confirmed
header("LOCATION:/system/insecure_zone/php/login.php"); header("LOCATION:/system/insecure_zone/php/login.php");
exit(); exit();
} }
include "../../../api/php/notifications/sendmessage.php"; //to send user notification on login
include "../../../api/php/log/add_server_entry.php"; //to log things
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@@ -60,7 +58,6 @@ include "../../../api/php/log/add_server_entry.php"; //to log things
if($pin==$_SESSION["pin"]) if($pin==$_SESSION["pin"])
{ {
$_SESSION["login"]=true; $_SESSION["login"]=true;
log_action("LOGIN::2FA::SUCCESS","User ".$_SESSION["username"]." logged in with second factor.",$_SESSION["id"]);
if($_SESSION["send_login_message"]=="1"){ if($_SESSION["send_login_message"]=="1"){
$ip = $_SERVER['REMOTE_ADDR']; $ip = $_SERVER['REMOTE_ADDR'];
$username=$_SESSION["username"]; $username=$_SESSION["username"];

View File

@@ -319,7 +319,6 @@ async function checkRegistration() {
//send the user to 2fa auth page //send the user to 2fa auth page
echo '<script>window.location.href = "/system/insecure_zone/php/2fa.php";</script>'; echo '<script>window.location.href = "/system/insecure_zone/php/2fa.php";</script>';
}else{ }else{
log_action("LOGIN::SUCCESS","User ".$_SESSION["username"]." logged in with password.",$_SESSION["id"]);
if($_SESSION["send_login_message"]=="1"){ if($_SESSION["send_login_message"]=="1"){
$ip = $_SERVER['REMOTE_ADDR']; $ip = $_SERVER['REMOTE_ADDR'];
$username=$row["username"]; $username=$row["username"];
@@ -329,7 +328,6 @@ async function checkRegistration() {
} }
exit(); exit();
} else { } else {
log_action("LOGIN::FAILURE","User ".$username." entered wrong password.",1);
echo '<div class="alert alert-danger" role="alert"> echo '<div class="alert alert-danger" role="alert">
Incorrect username or password. Incorrect username or password.
</div>'; </div>';
@@ -341,7 +339,6 @@ async function checkRegistration() {
</div>'; </div>';
} }
} else { } else {
log_action("LOGIN::FAILURE","User ".$username." entered unknown username.",1);
echo '<div class="alert alert-danger" role="alert"> echo '<div class="alert alert-danger" role="alert">
Incorrect username or password. Incorrect username or password.
</div>'; </div>';