From e5447d0702de9733f14d5d6ff1e1b46aac9335af Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Apr 2014 13:49:08 +0200 Subject: Comments. --- www/functions/func_login.php | 4 ++-- 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 '

You are banned!

'; - echo '

Too many authentication failures.
It's not my fault. I swear.

';} + echo '

Too many authentication failures.
It's not my fault. I swear.

'; }?> -- cgit v1.2.3