From e32e232b8aa734f9c3393b7ff460861b32b0e850 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 30 Jun 2010 14:04:29 -0600 Subject: [PATCH] Clean up log entry output if not fully authenticated --- imp/lib/Auth.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imp/lib/Auth.php b/imp/lib/Auth.php index 558869690..c1a9ce5c1 100644 --- a/imp/lib/Auth.php +++ b/imp/lib/Auth.php @@ -146,13 +146,13 @@ class IMP_Auth $imap_ob = $GLOBALS['injector']->getInstance('IMP_Imap')->getOb(); $msg = sprintf( - $status_msg . '%s [%s]%s to {%s:%s [%s]}', - $auth_id ? '' : ' for ' . $auth_id, + $status_msg . '%s [%s]%s to {%s:%s%s}', + !strlen($auth_id) ? '' : ' for ' . $auth_id, $_SERVER['REMOTE_ADDR'], empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? '' : ' (forwarded for [' . $_SERVER['HTTP_X_FORWARDED_FOR'] . '])', $imap_ob ? $imap_ob->getParam('hostspec') : '', $imap_ob ? $imap_ob->getParam('port') : '', - empty($_SESSION['imp']['protocol']) ? '' : $_SESSION['imp']['protocol'] + empty($_SESSION['imp']['protocol']) ? '' : ' [' . $_SESSION['imp']['protocol'] . ']' ); Horde::logMessage($msg, $level); -- 2.11.0