]> git.donarmstrong.com Git - debbugs.git/commitdiff
handle receips state properly; check for unescaped output in mbox
authorDon Armstrong <don@donarmstrong.com>
Thu, 1 Oct 2015 00:29:08 +0000 (17:29 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 1 Oct 2015 00:29:08 +0000 (17:29 -0700)
Debbugs/Log.pm
t/07_bugreport.t

index dce86d5c05a36d708ed22efe3c95cf4b062c7783..6ff8ab22357bef3817fc6dfaf6c7600a960b1acb 100644 (file)
@@ -289,6 +289,9 @@ sub read_record
                $record->{recips} = [split /\04/, $_, -1];
            }
            $this->{state} = 'kill-body';
+        $record->{start} = $logfh->tell+2;
+        $record->{stop} = $logfh->tell+2;
+        $record->{inner_file} = $this->{inner_file};
        } elsif ($this->{state} eq 'autocheck') {
            $record->{text} .= "$_\n" unless $this->{inner_file};
            next if !/^X-Debian-Bugs(-\w+)?: This is an autoforward from (\S+)/;
index 0366be41b9c5b72a5229c94f0aafe4a0bb01480e..3600e1ca7a35684e6b4120399bb4895d508b225d 100644 (file)
@@ -1,7 +1,7 @@
 # -*- mode: cperl;-*-
 
 
-use Test::More tests => 6;
+use Test::More tests => 8;
 
 use warnings;
 use strict;
@@ -84,6 +84,13 @@ ok($mech->content() =~ qr/Subject: Submitting a bug/i,
 ok($mech->content() =~ qr/^From /m,
    'Starts with a From appropriately');
 
+$mech->get_ok('http://localhost:'.$port.'/?bug=1;mboxmaint=yes',
+              'Page received ok');
+print STDERR $mech->content();
+ok($mech->content() !~ qr/[\x01\x02\x03\x05\x06\x07]/i,
+   'No unescaped states');
+
+
 
 # Other tests for bugs in the page should be added here eventually