From 4f68a7fe3e250d59c0fc17304c6ea227d22ebca1 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 20 Dec 2008 09:07:16 -0500
Subject: [PATCH] - Fixed login attempts bug - Fixed bug were the interface is enabled after an update on a server were interface = no selected during install - Fixed a replication problem and made replication more fault tolerant.

---
 interface/web/login/index.php |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/interface/web/login/index.php b/interface/web/login/index.php
index 3698f08..90b6caf 100644
--- a/interface/web/login/index.php
+++ b/interface/web/login/index.php
@@ -92,7 +92,8 @@
 				}
 
 	        	//* Check if there already wrong logins
-	        	$sql = "SELECT * FROM `attempts_login` WHERE `ip`= '{$ip}' AND  `login_time` < NOW() + INTERVAL 15 MINUTE LIMIT 1";
+	        	$sql = "SELECT * FROM `attempts_login` WHERE `ip`= '{$ip}' AND  `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1";
+				echo $sql;
 	        	$alreadyfailed = $app->db->queryOneRecord($sql);
 	        	//* login to much wrong
 	        	if($alreadyfailed['times'] > 5) {

--
Gitblit v1.9.1