From c8414c5914194aa95defbb65418a2cfb1f70327b Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 15 Sep 2011 08:15:35 +0000 Subject: [PATCH] Backport from trunk -Some installations may have no access to _SERVER['REMOTE_ADDR'] this fixes a potential error message git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@20992 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gosa-core/html/index.php b/gosa-core/html/index.php index 00766954d..32e3eb227 100644 --- a/gosa-core/html/index.php +++ b/gosa-core/html/index.php @@ -311,7 +311,12 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces $message= _("Please check the username/password combination!"); $smarty->assign ('nextfield', 'password'); session::global_set('config',$config); - new log("security","login","",array(),"Authentication failed for user \"$username\""); + if(isset($_SERVER['REMOTE_ADDR'])){ + $ip= $_SERVER['REMOTE_ADDR']; + new log("security","login","",array(),"Authentication failed for user \"$username\" [from $ip]"); + }else{ + new log("security","login","",array(),"Authentication failed for user \"$username\""); + } } else { /* Remove all locks of this user */ del_user_locks($ui->dn); -- 2.30.2