Fix summary version check
authorTimothy Gu <timothygu99@gmail.com>
Sun, 12 Apr 2015 21:27:52 +0000 (23:27 +0200)
committerTimothy Gu <timothygu99@gmail.com>
Sun, 12 Apr 2015 22:42:50 +0000 (15:42 -0700)
Also fold it into split_header.

FATE.pm
report.cgi

diff --git a/FATE.pm b/FATE.pm
index 30c220b..86ffe07 100644 (file)
--- a/FATE.pm
+++ b/FATE.pm
@@ -59,6 +59,8 @@ sub split_header {
     if ($hdr[1] eq '1') {
       $parsed->{'comment'} = $hdr[8];
       $parsed->{'branch'}  = $hdr[7];
+    } elsif ($hdr[1] ne '0') {
+      return undef;
     }
     return $parsed;
 }
index 92e9fba..9ae42fd 100755 (executable)
@@ -34,7 +34,6 @@ open R, '-|', "unxz -c $report" or fail 'Requsted report not found';
 
 my $hdr  = split_header scalar <R> or fail 'Invalid report';
 my $conf = split_config scalar <R> or fail 'Invalid report';
-$$hdr{version} eq '0'              or fail 'Bad report version';
 
 my %pass;
 my %fail;