Bugfixes in the analysis of sendmail logs.
authorarjen <arjen>
Thu, 8 Jan 2004 14:16:26 +0000 (14:16 +0000)
committerarjen <arjen>
Thu, 8 Jan 2004 14:16:26 +0000 (14:16 +0000)
src/gcm_daemon/classes/gnucomo.process_log.php

index 0a5e1de..2dec2de 100644 (file)
@@ -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":