From: hickert Date: Mon, 27 Jun 2011 06:27:06 +0000 (+0000) Subject: Update logging for failed logins X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3e95096ae4cc24bcb7dbb65dfa944b999c233bd0;p=gosa.git Update logging for failed logins git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20918 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/index.php b/gosa-core/html/index.php index 67ce4e364..32e3eb227 100644 --- a/gosa-core/html/index.php +++ b/gosa-core/html/index.php @@ -311,8 +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); - $ip= $_SERVER['REMOTE_ADDR']; - new log("security","login","",array(),"Authentication failed for user \"$username\" [from $ip]"); + 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);