From bf90ac1ba2c45633fe6a4b14b7f41b944589289f Mon Sep 17 00:00:00 2001 From: arjen Date: Thu, 8 Jan 2004 14:16:26 +0000 Subject: [PATCH] Bugfixes in the analysis of sendmail logs. --- src/gcm_daemon/classes/gnucomo.process_log.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gcm_daemon/classes/gnucomo.process_log.php b/src/gcm_daemon/classes/gnucomo.process_log.php index 0a5e1de..2dec2de 100644 --- a/src/gcm_daemon/classes/gnucomo.process_log.php +++ b/src/gcm_daemon/classes/gnucomo.process_log.php @@ -164,7 +164,7 @@ function linux_daemon_sendmail() $local_logline_array[$i] = trim($local_dummy); } - if (substr($local_logline_array[$i],0,1) == '[') + if (substr($local_logline_array[$i],0,1) == '[' && strstr($local_sql_2, "source_ip") == false) { $local_dummy = trim($local_logline_array[$i]); $local_sql_2 .= ", source_ip"; @@ -179,7 +179,7 @@ function linux_daemon_sendmail() { case "from": $local_sql_2 .= ", from_email"; - $local_sql_3 .= ", '".$local_element[1]."'"; + $local_sql_3 .= ", '". addslashes($local_element[1]) ."'"; break; case "size": -- 2.11.0