diff options
| -rwxr-xr-x | www/functions/func_login.php | 4 | ||||
| -rwxr-xr-x | www/httperror.php | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/www/functions/func_login.php b/www/functions/func_login.php index afd116c..943e20e 100755 --- a/www/functions/func_login.php +++ b/www/functions/func_login.php @@ -64,7 +64,7 @@ function brutforce_protection($db){ BEGIN TRANSACTION; INSERT INTO banned_user (id, ip, session_id, time) VALUES (NULL, '".SQLite3::escapeString($remote_ip)."', '".SQLite3::escapeString($session_id)."', ".$time."); COMMIT; - ") + "); banned(); } else { @@ -95,7 +95,7 @@ function check_if_banned($db){ $accepted_time = $_SERVER["REQUEST_TIME"] - 21600; // == 6h $db->exec("DELETE FROM banned_user WHERE time<'".$accepted_time."'"); - if($log_at <= 0) + if($log_at <= 0){ if ($check_ar[0] >= $accepted_time){ return true; // still banned } diff --git a/www/httperror.php b/www/httperror.php index e22dd28..423f0fa 100755 --- a/www/httperror.php +++ b/www/httperror.php @@ -6,6 +6,8 @@ 500 502 504 + + ban -- user is banned and not allowed to log in 404 is displayed if $_GET["e"] is not set. @@ -52,7 +54,7 @@ }elseif($_GET['e']=='ban'){ echo '<h1 id="Error-Page-head" >You are banned!</h1>'; - echo '<h2 id="Error-Page-description" >Too many authentication failures.</br>It's not my fault. I swear.</h2>';} + echo '<h2 id="Error-Page-description" >Too many authentication failures.</br>It's not my fault. I swear.</h2>'; }?> </div> <?php include("static/footer.html");?> |
