escape binary nulls in log files
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 12 Mar 2010 14:48:27 +0000 (14:48 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 12 Mar 2010 14:48:27 +0000 (14:48 +0000)
cgi-bin/pgstatus.pl

index 603e15f2e1be9cdf1bea8000fd1c8540edaf5275..1fe9e7f017d259011e6d03ae1b43af75c25519be 100755 (executable)
@@ -282,6 +282,7 @@ foreach my $log_file( @log_file_names )
   $stage_start = $mtime;
   my $ltext = <$handle>;
   close($handle);
+  $ltext =~ s/\x00/\\0/g;
   $sth->execute($animal,$dbdate,$branch,$log_file,$ltext, 
                "$stage_interval seconds");
 }