From: Don Armstrong $body
\n);
}
}
return 0;
@@ -363,7 +377,7 @@ sub handle_record{
# $record->{text} is not in perl's internal encoding; convert it
my $text = decode_rfc1522(decode_utf8(record_text($record)));
my ($time) = $text =~ //;
- my $class = $text =~ /^(?:Acknowledgement|Reply|Information|Report|Notification)/m ? 'infmessage':'msgreceived';
+ my $class = $text =~ /^(?:Acknowledgement|Information|Report|Notification)/m ? 'infmessage':'msgreceived';
$output .= $text;
# Link to forwarded http:// urls in the midst of the report
# (even though these links already exist at the top)
@@ -372,7 +386,7 @@ sub handle_record{
# Add links to the cloned bugs
$output =~ s{(Bug )(\d+)( cloned as bugs? )(\d+)(?:\-(\d+)|)}{$1.bug_links(bug=>$2).$3.bug_links(bug=>(defined $5)?[$4..$5]:$4)}eo;
# Add links to merged bugs
- $output =~ s{(?<=Merged )([\d\s]+)(?=\.)}{join(' ',map {bug_links(bug=>$_)} (split /\s+/, $1))}eo;
+ $output =~ s{(?<=Merged )([\d\s]+)(?=[\.<])}{join(' ',map {bug_links(bug=>$_)} (split /\s+/, $1))}eo;
# Add links to blocked bugs
$output =~ s{(?<=Blocking bugs)(?:( of )(\d+))?( (?:added|set to|removed):\s+)([\d\s\,]+)}
{(defined $2?$1.bug_links(bug=>$2):'').$3.
@@ -381,7 +395,7 @@ sub handle_record{
(\d+(?:,\s+\d+)*(?:\,?\s+and\s+\d+)?)}
{$1.(defined $3?$2.bug_links(bug=>$3):'').$4.
english_join([map {bug_links(bug=>$_)} (split /\,?\s+(?:and\s+)?/, $5)])}xeo;
- $output =~ s{([Aa]dded|[Rr]emoved)( indication that bug )(\d+)( blocks )([\d\s\,]+)}
+ $output =~ s{([Aa]dded|[Rr]emoved)( indication that bug )(\d+)( blocks ?)([\d\s\,]+)}
{$1.$2.(bug_links(bug=>$3)).$4.
english_join([map {bug_links(bug=>$_)} (split /\,?\s+(?:and\s+)?/, $5)])}eo;
# Add links to reassigned packages
@@ -392,19 +406,20 @@ sub handle_record{
if (defined $time) {
$output .= ' ('.strftime('%a, %d %b %Y %T GMT',gmtime($time)).') ';
}
- $output .= ' $bug_number,
options => {msg => ($msg_number+1)},
links_only => 1,
)
- ) . '">Full text and full text, rfc822 format available.';
+ ) . '">mbox, '.
+ qq{link).
\n); + return () if defined $param{spam} and $param{spam}->is_spam($msg_id); + $output .= qq(
ð\n); $output .= 'View this message in rfc822 format
'; $output .= handle_email_message($record, ref => $bug_number, @@ -433,6 +449,7 @@ sub handle_record{ elsif (defined $msg_id) { $$seen_msg_ids{$msg_id} = 1; } + return () if defined $param{spam} and $param{spam}->is_spam($msg_id); # Incomming Mail Message my ($received,$hostname) = record_regex($record,qr/Received: \(at (\S+)\) by (\S+)\;/o); $output .= qq|Message #$msg_number received at |. diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index 3e9cb3f..4391197 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -128,7 +128,7 @@ sub generate_package_info{ my @references; my $pseudodesc = getpseudodesc(); if ($package and defined($pseudodesc) and exists($pseudodesc->{$package})) { - push @references, "to the ". + push @references, "to the ". "list of other pseudo-packages"; } elsif (not defined $maint and not @{$param{bugs}}) { @@ -141,14 +141,14 @@ sub generate_package_info{ else { if ($package and defined $config{package_pages} and length $config{package_pages}) { push @references, sprintf "to the %s package page", - html_escape("http://$config{package_pages}/$package"), html_escape("$package"); + html_escape("$config{package_pages}/$package"), html_escape("$package"); } if (defined $config{subscription_domain} and length $config{subscription_domain}) { my $ptslink = $param{binary} ? $srcforpkg : $package; # the pts only wants the source, and doesn't care about src: (#566089) $ptslink =~ s/^src://; - push @references, q(to the Package Tracking System); + push @references, q(to the Package Tracking System); } # Only output this if the source listing is non-trivial. if ($param{binary} and $srcforpkg) { @@ -166,7 +166,7 @@ sub generate_package_info{ if (defined $maint) { print {$output} "
If you find a bug not listed here, please\n"; printf {$output} "report it.
\n", - html_escape("http://$config{web_domain}/Reporting$config{html_suffix}"); + html_escape("$config{web_domain}/Reporting$config{html_suffix}"); } return decode_utf8($output_scalar); } diff --git a/Debbugs/Common.pm b/Debbugs/Common.pm index aad3fe6..ae7d8b4 100644 --- a/Debbugs/Common.pm +++ b/Debbugs/Common.pm @@ -46,6 +46,7 @@ BEGIN{ qw(getpseudodesc), qw(package_maintainer), qw(sort_versions), + qw(open_compressed_file), ], misc => [qw(make_list globify_scalar english_join checkpid), qw(cleanup_eval_fail), @@ -240,7 +241,40 @@ sub overwritefile { die "Unable to rename ${file}.new to $file: $!"; } +=head2 open_compressed_file + my $fh = open_compressed_file('foo.gz') or + die "Unable to open compressed file: $!"; + + +Opens a file; if the file ends in .gz, .xz, or .bz2, the appropriate +decompression program is forked and output from it is read. + +This routine by default opens the file with UTF-8 encoding; if you want some +other encoding, specify it with the second option. + +=cut +sub open_compressed_file { + my ($file,$encoding) = @_; + $encoding //= ':encoding(UTF-8)'; + my $fh; + my $mode = "<$encoding"; + my @opts; + if ($file =~ /\.gz$/) { + $mode = "-|$encoding"; + push @opts,'gzip','-dc'; + } + if ($file =~ /\.xz$/) { + $mode = "-|$encoding"; + push @opts,'xz','-dc'; + } + if ($file =~ /\.bz2$/) { + $mode = "-|$encoding"; + push @opts,'bzip2','-dc'; + } + open($fh,$mode,@opts,$file); + return $fh; +} @@ -393,7 +427,7 @@ sub package_maintainer { for my $fn (@config{('source_maintainer_file', 'source_maintainer_file_override', 'pseudo_maint_file')}) { - next unless defined $fn; + next unless defined $fn and length $fn; if (not -e $fn) { warn "Missing source maintainer file '$fn'"; next; @@ -409,7 +443,7 @@ sub package_maintainer { for my $fn (@config{('maintainer_file', 'maintainer_file_override', 'pseudo_maint_file')}) { - next unless defined $fn; + next unless defined $fn and length $fn; if (not -e $fn) { warn "Missing maintainer file '$fn'"; next; @@ -460,7 +494,7 @@ sub __add_to_hash { } $type //= 'address'; my $fh = IO::File->new($fn,'r') or - die "Unable to open $fn for reading: $!"; + croak "Unable to open $fn for reading: $!"; binmode($fh,':encoding(UTF-8)'); while (<$fh>) { chomp; @@ -500,7 +534,8 @@ sub getpseudodesc { return $_pseudodesc if defined $_pseudodesc; $_pseudodesc = {}; __add_to_hash($config{pseudo_desc_file},$_pseudodesc) if - defined $config{pseudo_desc_file}; + defined $config{pseudo_desc_file} and + length $config{pseudo_desc_file}; return $_pseudodesc; } diff --git a/Debbugs/Config.pm b/Debbugs/Config.pm index 1811631..596d053 100644 --- a/Debbugs/Config.pm +++ b/Debbugs/Config.pm @@ -47,6 +47,7 @@ BEGIN { qw($gWebDomain $gHTMLSuffix $gCGIDomain $gMirrors), qw($gPackagePages $gSubscriptionDomain $gProject $gProjectTitle), qw($gMaintainer $gMaintainerWebpage $gMaintainerEmail $gUnknownMaintainerEmail), + qw($gPackageTrackingDomain $gUsertagPackageDomain), qw($gSubmitList $gMaintList $gQuietList $gForwardList), qw($gDoneList $gRequestList $gSubmitterList $gControlList), qw($gStrongList), @@ -152,12 +153,13 @@ set_default(\%config,'web_host_bug_dir',''); =item web_domain $gWebDomain -Full path of the web domain where bugs are kept, defaults to the -concatenation of L and L +Full path of the web domain where bugs are kept including the protocol (http:// +or https://). Defaults to the concatenation of 'http://', L and +L =cut -set_default(\%config,'web_domain',$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir}); +set_default(\%config,'web_domain','http://'.$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir}); =item html_suffix $gHTMLSuffix @@ -170,7 +172,7 @@ set_default(\%config,'html_suffix','.html'); =item cgi_domain $gCGIDomain Full path of the web domain where cgi scripts are kept. Defaults to -the concatentation of L and cgi. +the concatentation of L and cgi. =cut @@ -188,21 +190,33 @@ set_default(\%config,'mirrors',[]); =item package_pages $gPackagePages Domain where the package pages are kept; links should work in a -package_pages/foopackage manner. Defaults to undef, which means that -package links will not be made. +package_pages/foopackage manner. Defaults to undef, which means that package +links will not be made. Should be prefixed with the appropriate protocol +(http/https). =cut set_default(\%config,'package_pages',undef); +=item package_tracking_domain $gPackageTrackingDomain + +Domain where the package pages are kept; links should work in a +package_tracking_domain/foopackage manner. Defaults to undef, which means that +package links will not be made. Should be prefixed with the appropriate protocol +(http or https). + +=cut + +set_default(\%config,'package_tracking_domain',undef); + =item package_pages $gUsertagPackageDomain Domain where where usertags of packages belong; defaults to $gPackagePages =cut -set_default(\%config,'usertag_package_domain',$config{package_pages}); +set_default(\%config,'usertag_package_domain',map {my $a = $_; defined $a?$a =~ s{https?://}{}:(); $a} $config{package_pages}); =item subscription_domain $gSubscriptionDomain @@ -214,16 +228,25 @@ Domain where subscriptions to package lists happen set_default(\%config,'subscription_domain',undef); +=item cc_all_mails_to_addr $gCcAllMailsToAddr + +Address to Cc (well, Bcc) all e-mails to + +=cut + +set_default(\%config,'cc_all_mails_to_addr',undef); + + =item cve_tracker $gCVETracker URI to CVE security tracker; in bugreport.cgi, CVE-2001-0002 becomes -linked to http://$config{cve_tracker}CVE-2001-002 +linked to $config{cve_tracker}CVE-2001-002 -Default: security-tracker.debian.org/tracker/ +Default: https://security-tracker.debian.org/tracker/ =cut -set_default(\%config,'cve_tracker','security-tracker.debian.org/tracker/'); +set_default(\%config,'cve_tracker','https://security-tracker.debian.org/tracker/'); =back @@ -527,12 +550,12 @@ set_default(\%config,'removal_distribution_tags', For removal/archival purposes, all bugs are assumed to have these tags set. -Default: qw(unstable testing); +Default: qw(experimental unstable testing); =cut set_default(\%config,'removal_default_distribution_tags', - [qw(unstable testing)] + [qw(experimental unstable testing)] ); =item removal_strong_severity_default_distribution_tags @@ -540,12 +563,12 @@ set_default(\%config,'removal_default_distribution_tags', For removal/archival purposes, all bugs with strong severity are assumed to have these tags set. -Default: qw(unstable testing stable); +Default: qw(experimental unstable testing stable); =cut set_default(\%config,'removal_strong_severity_default_distribution_tags', - [qw(unstable testing stable)] + [qw(experimental unstable testing stable)] ); @@ -868,6 +891,15 @@ Default arguments to pass to sendmail. Defaults to C
- Debian $config{bug} tracking system
+ Debian $config{bug} tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.
+
Oldcookies $oldcookies .\n"; -print "
Cookies set!\n";
-for my $c (@cookie_options) {
- my $old = $oldcookies{$c} || "unset";
- if (defined $param{$c}) {
- printf "
Set %s=%s (was %s)\n", $c, $param{$c}, $old;
- } elsif ($clear) {
- printf "
Cleared %s (was %s)\n", $c, $old;
- } else {
- printf "
Didn't touch %s (was %s; use clear=yes to clear)\n", $c, $old;
- }
-}
diff --git a/cgi/pkgindex.cgi b/cgi/pkgindex.cgi
index 793cda2..a43428a 100755
--- a/cgi/pkgindex.cgi
+++ b/cgi/pkgindex.cgi
@@ -43,14 +43,14 @@ elsif (defined $param{prev}) {
my $indexon = $param{indexon};
if ($param{indexon} !~ m/^(pkg|src|maint|submitter|tag)$/) {
- quitcgi("You have to choose something to index on");
+ quitcgi("You have to choose something to index on", '400 Bad Request');
}
my $repeatmerged = $param{repeatmerged} eq 'yes';
my $archive = $param{archive} eq "yes";
my $sortby = $param{sortby};
if ($sortby !~ m/^(alpha|count)$/) {
- quitcgi("Don't know how to sort like that");
+ quitcgi("Don't know how to sort like that", '400 Bad Request');
}
my $Archived = $archive ? " Archived" : "";
diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi
index 1ea9a17..abf739d 100755
--- a/cgi/pkgreport.cgi
+++ b/cgi/pkgreport.cgi
@@ -20,6 +20,7 @@ BEGIN{
binmode(STDOUT,':encoding(UTF-8)');
use POSIX qw(strftime nice);
+use List::AllUtils qw(uniq);
use Debbugs::Config qw(:globals :text :config);
@@ -228,7 +229,8 @@ our %cats = (
"ord" => [2,3,4,1,0,5],
} ],
"oldview" => [ qw(status severity) ],
- "normal" => [ qw(status severity classification) ],
+ "normal" => [ qw(status severity classification) ],
+ raw => [{nam => 'Raw',def => 'Raw'}],
);
if (exists $param{which} and exists $param{data}) {
@@ -275,7 +277,8 @@ if (defined $param{usertag}) {
}
}
-quitcgi("You have to choose something to select by") unless grep {exists $param{$_}} keys %package_search_keys;
+quitcgi("You have to choose something to select by", '400 Bad Request')
+ unless grep {exists $param{$_}} keys %package_search_keys;
my $Archived = $param{archive} ? " Archived" : "";
@@ -494,6 +497,9 @@ print fill_in_template(template=>'cgi/pkgreport_javascript');
print qq(
Couldn't execute bugreport.cgi!!"; - exit(0); -} else { - my $suite; - my $arch; - if ($path =~ m,^/suite/([^/]*)(/.*)$,) { - $suite = $1; $path = $2; - } elsif ($path =~ m,^/arch/([^/]*)(/.*)$,) { - $arch = $1; $path = $2; - } elsif ($path =~ m,^/suite-arch/([^/]*)/([^/]*)(/.*)$,) { - $suite = $1; $arch = $2; $path = $3; - } - - my $type; - my $what; - my $selection; - if ($path =~ m,^/(package|source|maint|submitter|severity|tag|user-tag)/([^/]+)(/(.*))?$,) { - $type = $1; $what = $2; $selection = $4 || ""; - if ($selection ne "") { - unless ($type =~ m,^(package|source|user-tag)$,) { - bad_url(); - } - } - my @what = split /,/, $what; - my @selection = split /,/, $selection; - my $typearg = $type; - $typearg = "pkg" if ($type eq "package"); - $typearg = "src" if ($type eq "source"); - - my @args = (); - push @args, $typearg . "=" . join(",", @what); - push @args, "version=" . join(",", @selection) - if ($type eq "package" and $#selection >= 0); - push @args, "utag=" . join(",", @selection) - if ($type eq "user-tag" and $#selection >= 0); - push @args, "arch=" . $arch if (defined $arch); - push @args, "suite=" . $suite if (defined $suite); - - { $ENV{"PATH"}="/bin"; exec "./pkgreport.cgi", "leeturls=yes", @args } - - print "Content-Type: text/html; charset=utf-8\n\n"; - print "
Couldn't execute pkgreport.cgi!!"; - exit(0); - } else { - bad_url(); - } -} - -sub bad_url { - print "Content-Type: text/html; charset=utf-8\n\n"; - print "
Bad URL :(\n";
- exit(0);
-}
diff --git a/debian/changelog b/debian/changelog
index b91355b..41458cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,30 @@ debbugs (2.6.0~exp1) UNRELEASED; urgency=low
newer versions of SOAP::Lite. (Closes: #785405)
* Add patch to do singular/plural in error messages from Rafael.
(Closes: #790716)
+ * Fix (and test) setting summary/outlook in Control: messages (Closes:
+ #836613).
+ * Fix clone removing all other blocks instead of adding them (Closes:
+ #820044). Thanks to James Clarke.
+ * Use a supported version of debhelper and switch to dh $@ style rules
+ (Closes: #800287)
+ * debbugs-web now Breaks/Replaces debbugs (<< 2.4.2) (Closes: #717967)
+ * Split source file properly (Closes: #858671). Thanks to James McCoy.
+ * Prefix 'src:' to all source package names.
+ * cdn.libravatar.org no longer sends Content-Type. Switch to verifying
+ the content-type using libmagic instead (which we probably should have
+ been doing from the beginning anyway). (Closes: #856991)
+ * Reply sent messages (-forwarded and -done) are not informational messages.
+ (Closes: #864725)
+ * Pluralize singular tag and usertag in pseudoheaders (Closes: #861234).
+ Thanks to James Clarke
+ * Include link to the location of the debbugs source (Closes: #721569).
+ * Add envelope_from configuration variable so sites can set a valid return
+ path if the sendmail default is wrong. (Closes: #719205)
+ * Fix links to merged and blocked bugs. (Closes: #539691)
+ * Strip out Mail-Followup-To: (Closes: #798092)
+
+ [ Niels Thykier ]
+ * quitcgi() now returns 400/500 status codes instead of 200 (Closes: #584922)
[Thanks to Arnout Engelen: ]
* Add Homepage (closes: #670555).
@@ -391,6 +415,8 @@ debbugs (2.4.2~exp0) experimental; urgency=low
#517834)
* Ditch extra blank lines (closes: #494843)
* Handle ' ending links in Debbugs::CGI::Bugreport (closes: #539020)
+ * Forcibly wrap format flowed and other messages (closes: #601242)
+ * Add a link to ack_thanks in process (Closes: #863274)
-- Don Armstrong Find a bug by number:
-