]> git.donarmstrong.com Git - debbugs.git/commitdiff
handle non-existant Message-Id: properly
authorDon Armstrong <don@donarmstrong.com>
Tue, 4 Dec 2012 00:52:06 +0000 (16:52 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 4 Dec 2012 00:52:06 +0000 (16:52 -0800)
cgi/bugreport.cgi

index de4ec76371633cfe8d9760a14a7f6e2142df6250..55617ae1f2a9abcd186bbf5007576a2e4572670e 100755 (executable)
@@ -224,11 +224,11 @@ END
          # we want to include control messages anyway
          my $record_wanted_anyway = 0;
          my ($msg_id) = $record->{text} =~ /^Message-Id:\s+<(.+)>/im;
-         next if exists $seen_message_ids{$msg_id};
-         next if $msg_id =~/handler\..+\.ack(?:info|done)?\@/;
+         next if defined $msg_id and exists $seen_message_ids{$msg_id};
+         next if defined $msg_id and $msg_id =~/handler\..+\.ack(?:info|done)?\@/;
          $record_wanted_anyway = 1 if $record->{text} =~ /^Received: \(at control\)/;
          next if not $boring and not $record->{type} eq $wanted_type and not $record_wanted_anyway and @records > 1;
-         $seen_message_ids{$msg_id} = 1;
+         $seen_message_ids{$msg_id} = 1 if defined $msg_id;
          my @lines = split( "\n", $record->{text}, -1 );
          if ( $lines[ 1 ] =~ m/^From / ) {
               my $tmp = $lines[ 0 ];