<dt><code>moreinfo</code>
<dd>This `$gBug can\'t be addressed until more information is provided by the
- submitter. The `$gBug will be closed if the submitter doesn\'t provide ore
+ submitter. The `$gBug will be closed if the submitter doesn\'t provide more
information in a reasonable (few months) timeframe. This is for `$gBugs like
\"It doesn\'t work\". What doesn\'t work?
* Fix unescaped From (closes: #983847)
* Actually return message/rfc822 when there is a single message instead
of mbox (closes: #1009181)
+ * Fix missing escaping of comma in address fields (closes: #1041638)
+ * Sort blocked-by (closes: 751808), thanks to Tim Landscheidt.
+ * Don't linkify trailing ; in bug messages (closes: #1076323), thanks to
+ Blair Noctis.
-- Don Armstrong <don@debian.org> Fri, 09 Mar 2018 11:17:10 -0800
libmailtools-perl, libmime-tools-perl, libio-stringy-perl, libmldbm-perl,
liburi-perl, libsoap-lite-perl, libcgi-simple-perl,
libhttp-server-simple-perl, libtest-www-mechanize-perl,
- libmail-rfc822-address-perl, libuser-perl,
+ libmail-rfc822-address-perl, libuser-perl, libmail-message-perl,
libconfig-simple-perl, libtest-pod-perl, liblist-allutils-perl,
libfile-libmagic-perl, libgravatar-url-perl, libwww-perl, imagemagick,
libdbix-class-perl, libdatetime-format-pg-perl, libtest-postgresql-perl,
libdatetime-perl,
libaliased-perl,
postgresql,
- postgresql-9.6-debversion|postgresql-10-debversion|postgresql-11-debversion,
+ postgresql-16-debversion|postgresql-15-debversion|postgresql-13-debversion,
libtext-xslate-perl, graphviz, libtext-iconv-perl, libnet-server-perl,
libmouse-perl, libmousex-nativetraits-perl,
# required for use strictures 2
libdebbugs-perl
Recommends: debbugs-web (>= 2.6~)
Suggests: spamassassin (>= 3.0), libcgi-alert-perl, postgresql,
- postgresql-9.6-debversion|postgresql-10-debversion|postgresql-11-debversion
+ postgresql-13-debversion|postgresql-15-debversion|postgresql-16-debversion
Description: bug tracking system based on the active Debian BTS
Debian has a bug tracking system which files details of bugs reported by
users and developers. Each bug is given a number, and is kept on file until
libmail-rfc822-address-perl, liblist-allutils-perl,
graphviz, libtext-iconv-perl, libuser-perl,
libmouse-perl, libmousex-nativetraits-perl,
+ libmail-message-perl,
# used by Debbugs::Libravatar and libravatar.cgi
- libfile-libmagic-perl, libgravatar-url-perl, libwww-perl, imagemagick
- # used by the database
+ libfile-libmagic-perl, libgravatar-url-perl, libwww-perl, imagemagick,
+# used by the database
libdbix-class-timestamp-perl,
libdbix-class-deploymenthandler-perl,
libdatetime-perl,
${perl:Depends},
${misc:Depends},
libdebbugs-perl, debbugs-web, libconfig-simple-perl,
- libuser-perl, rsync, libhttp-server-simple-perl, libnet-server-perl
+ libuser-perl, rsync, libhttp-server-simple-perl, libnet-server-perl,
+ sensible-utils
Description: Run and maintains a local mirror of the Debian BTS
Debian has a bug tracking system which files details of bugs reported
by users and developers. Each bug is given a number, and is kept on
-UPGRADE debian/README.mail
+UPGRADE.md debian/README.mail
--- /dev/null
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+
+# If Salsa-CI is not running at
+# https://salsa.debian.org/%{project_path}/-/pipelines, ensure that
+# https://salsa.debian.org/%{project_path}/-/settings/ci_cd has in field "CI/CD
+# configuration file" filename "debian/salsa-ci.yml"
+
+# The package does not have any debian/tests and thus autopkgtest will run
+# autodep8-perl which does not pass, and will need some work before enabled:
+# autodep8-perl-build-deps FAIL non-zero exit status 253
+# autodep8-perl PASS (superficial)
+# autodep8-perl-recommends FAIL non-zero exit status 1
+autopkgtest:
+ extends: .test-autopkgtest
+ allow_failure: true
--export-text-to-path --export-plain-svg debbugs_logo.svg $<;
debbugs_logo_icon.png: debbugs_logo.svg
- inkscape --without-gui \
+ inkscape \
--export-width 32 --export-height 32 \
--export-background=white \
- --export-png $@ $<
+ --export-type=png --export-filename=$@ $<
# We don't html escape here because we escape above;
# wierd terminators are because of that
$body =~ s{((?:ftp|http|https|svn|ftps|rsync)://[\S~-]+?/?) # Url
- ((?:\>\;)?[)]?(?:'|\&\#39\;|\"\;)?[:.\,]?(?:\s|$)) # terminators
+ ((?:\>\;)?[)]?(?:'|\&\#39\;|\"\;)?[:.\,;]?(?:\s|$)) # terminators
}{<a href=\"$1\">$1</a>$2}gox;
# Add links to bug closures
$body =~ s[((?:closes|see):\s* # start of closed/referenced bugs
not defined $_maintainer_rev) {
$_maintainer = {};
$_maintainer_rev = {};
- if (-e $config{spool_dir}.'/maintainers.idx' and
- -e $config{spool_dir}.'/maintainers_reverse.idx'
+ if (-e $config{spool_dir}.'/binary_maintainers.idx' and
+ -e $config{spool_dir}.'/binary_maintainers_reverse.idx'
) {
tie %{$_maintainer},
MLDBM => $config{spool_dir}.'/binary_maintainers.idx',
%EXPORT_TAGS = (mime => [qw(parse create_mime_message getmailbody),
qw(parse_to_mime_entity),
],
- rfc1522 => [qw(decode_rfc1522 encode_rfc1522)],
+ rfc1522 => [qw(decode_rfc1522 encode_rfc1522 handle_escaped_commas)],
);
@EXPORT_OK=();
Exporter::export_ok_tags(keys %EXPORT_TAGS);
use File::Path qw(remove_tree);
use File::Temp qw(tempdir);
use MIME::Parser;
+use Mail::Message::Field;
use POSIX qw(strftime);
use List::AllUtils qw(apply);
return $string;
}
+=head2
+
+ $header = handle_escaped_commas('','From: ')
+
+Handle commas in addresses which have been RFC1522 escaped and now need to be
+quoted to avoid parsing as a record separator.
+
+=cut
+
+sub handle_escaped_commas {
+ my ($modified_hdr, $orig_hdr) = @_;
+
+ my $field = Mail::Message::Field->new($orig_hdr);
+ # if the header isn't structured, it can't contain an address
+ if (not $field->isStructured()) {
+ return $modified_hdr
+ }
+ if ($field->name() !~ m/^(?:to|from|reply-to)$/) {
+ return $modified_hdr
+ }
+ my @addresses = $field->addresses();
+ if (not @addresses) {
+ return $modified_hdr
+ }
+ my @return_addresses;
+ for my $address (@addresses) {
+ $address->phrase(decode_rfc1522($address->phrase()));
+ push @return_addresses, $address->format();
+ }
+ return join(', ',@return_addresses)
+}
+
1;
$data{archived} = (defined($location) and ($location eq 'archive'))?1:0;
$data{bug_num} = $param{bug};
+ # Sort blockedby numerically so that bugs with identical blockers have
+ # identical lists.
+ if (defined $data{blockedby} and
+ $data{blockedby}) {
+ $data{blockedby} =
+ join(' ',
+ sort { $a <=> $b }
+ split / /, $data{blockedby}
+ );
+ }
+
# mergedwith occasionally is sorted badly. Fix it to always be sorted by <=>
# and not include this bug
if (defined $data{mergedwith} and
mail-followup-to|
references):
|From\s|X-Debbugs-)/xi;
- $fwd .= encode_utf8($hdr)."\n" if $ins;
+ $fwd .= $orig_hdr."\n" if $ins;
# print {$debugfh} ">$_<\n";
if (s/^(\S+):\s*//) {
my $v = lc $1;
push @common_headers, 'X-Loop',$_;
}
print {$debugfh} ">$v=$_<\n";
- $header{$v} = $_;
+ # Handle a comma which is escaped being passed through un-escaped. See
+ # https://bugs.debian.org/1041638
+ if ($_ =~ m/,/ and not $orig_hdr =~ m/,/) {
+ $header{$v} = handle_escaped_commas($_,$orig_hdr);
+ } else {
+ $header{$v} = $_;
+ }
} else {
print {$debugfh} "!>$_<\n";
}
);
}
}
- if ($name eq 'usertags'){
+ if ($name eq 'usertags' and defined $current_user){
my %user_tags;
read_usertags(\%user_tags, $current_user);
$value =~ s/(?:^\s+|\s+$)//g;
# -*- mode: cperl;-*-
# $Id: 01_mime.t,v 1.1 2005/08/17 21:46:17 don Exp $
-use Test::More tests => 6;
+use Test::More tests => 7;
use warnings;
use strict;
"encode_rfc1522 encodes strings that decode_rfc1522 can decode");
ok(Debbugs::MIME::decode_rfc1522(Debbugs::MIME::encode_rfc1522(encode_utf8($test_str3))) eq $test_str3,
"encode_rfc1522 properly handles parenthesis and \"");
-
+ok(Debbugs::MIME::handle_escaped_commas(q(),q(From: =?UTF-8?Q?Armstrong=2C?= Don <don@donarmstrong.com>)) eq q("Armstrong, Don" <don@donarmstrong.com>),
+ "handle_escaped_commas properly handles commas in RFC1522 encoded strings");
# Make sure that create_mime_message has encoded headers and doesn't enclude any 8-bit characters
# -*- mode: cperl;-*-
-use Test::More tests => 19;
+use Test::More tests => 22;
use warnings;
use strict;
}
# Other tests for bugs in the page should be added here eventually
+send_message(to => '1@bugs.something',
+ headers => [To => '1@bugs.something',
+ From => 'foo@bugs.something',
+ Subject => "Message with some links to linkify",
+ ],
+ body => <<EOF) or fail 'message to 1@bugs.something failed';
+This is a test message.
+
+This is a link https://example.com/foo; which should not include the ;
+
+
+This is a link https://example.com/foo;bar which should include the ;
+EOF
+
+$mech->get_ok('http://localhost:'.$port.'/?bug=1',
+ 'Page received ok');
+like($mech->content(), qr(href="https://example.com/foo;bar"),
+ 'Link includes ; correctly');
+like($mech->content(), qr(href="https://example.com/foo"),
+ 'Link excludes trailing ;');
],
body => <<'EOF') or fail 'message to control@bugs.something failed';
debug 10
-clone 2 -1 -2 -3 -4 -5 -6
+clone 2 -1 -2 -3 -4 -5 -6 -7 -8
retitle 2 foo
owner 2 bar@baz.com
submitter 2 fleb@bleh.com
found -4 1.2-1
found -5 1.2-5
fixed -5 1.2-6
+block -7 by -1
+block -7 by -2
+block -8 by -2
+block -8 by -1
thanks
EOF
+# The order of "Blocked-By:" in *.summary is not deterministic, so
+# these tests assert that the blockers of bugs #9 and #10 are sorted
+# differently.
+ok(system('perl', '-i', '-pwe', 's/^Blocked-By: 4 3\n/Blocked-By: 3 4\n/;', $spool_dir . '/db-h/09/9.summary') == 0, 'Changed bug #9');
+ok(system('perl', '-i', '-pwe', 's/^Blocked-By: 3 4\n/Blocked-By: 4 3\n/;', $spool_dir . '/db-h/10/10.summary') == 0, 'Changed bug #10');
+ok(system('grep','-q','^Blocked-By: 3 4',"$spool_dir/db-h/09/9.summary") == 0,'Bug #9 has "Blocked-By: 3 4"');
+ok(system('grep','-q','^Blocked-By: 4 3',"$spool_dir/db-h/10/10.summary") == 0,'Bug #10 has "Blocked-By: 4 3"');
+
test_control_commands(\%config,
forcemerge => {command => 'forcemerge',
value => "2 3\nseverity 2 minor",
status_value => '8',
bug => '7',
},
+ merge => {command => 'merge',
+ value => '9 10',
+ status_key => 'mergedwith',
+ status_value => '10',
+ bug => '9',
+ },
);
done_testing();