From cd7cd0548dfc0a0cac3e94af7fabe37b114c6f31 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Fri, 12 Mar 2010 14:48:27 +0000 Subject: [PATCH] escape binary nulls in log files --- cgi-bin/pgstatus.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/cgi-bin/pgstatus.pl b/cgi-bin/pgstatus.pl index 603e15f..1fe9e7f 100755 --- a/cgi-bin/pgstatus.pl +++ b/cgi-bin/pgstatus.pl @@ -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"); } -- 2.30.2