Don't show logs bigger than 64 MB

This commit is contained in:
Eelco Dolstra 2013-08-30 20:44:04 +00:00
parent 6655ada236
commit 614f07755a

View file

@ -148,6 +148,10 @@ sub showLog {
notFound($c, "The build log of derivation $drvPath is not available.") unless defined $logPath; notFound($c, "The build log of derivation $drvPath is not available.") unless defined $logPath;
my $size = stat($logPath)->size;
error($c, "This build log is too big to display ($size bytes).")
if $size >= 64 * 1024 * 1024;
if (!$mode) { if (!$mode) {
# !!! quick hack # !!! quick hack
my $pipeline = ($logPath =~ /.bz2$/ ? "bzip2 -d < $logPath" : "cat $logPath") my $pipeline = ($logPath =~ /.bz2$/ ? "bzip2 -d < $logPath" : "cat $logPath")