# Incomming Mail Message
my ($received,$hostname) = $record->{text} =~ m/Received: \(at (\S+)\) by (\S+)\;/;
$output .= qq|<hr><p class="msgreceived"><a name="$msg_number"></a><a name="msg$msg_number">Message received</a> at |.
+ $output .= qq|<hr><p class="msgreceived"><a name="$msg_number"><a name="msg$msg_number">Message received</a> at |.
htmlsanit("$received\@$hostname") . q| (<a href="| . bugurl($ref, "msg=$msg_number") . '">full text</a>'.q|, <a href="| . bugurl($ref, "msg=$msg_number") . ';mbox=yes">mbox</a>)'.":</p>\n";
$output .= handle_email_message($record->{text},
ref => $bug_number,
}
sub myurl {
- return pkg_etc_url($pkg, "pkg", 0) if defined($pkg);
- return pkg_etc_url($src, "src", 0) if defined($src);
- return pkg_etc_url($maint, "maint", 0) if defined($maint);
- return pkg_etc_url($submitter, "submitter", 0) if defined($submitter);
- return pkg_etc_url($severity, "severity", 0) if defined($severity);
- return pkg_etc_url($tag, "tag", 0) if defined($tag);
+ return urlsanit('pkgreport.cgi?'.
+ join(';',
+ (map {("$_=$param{$_}")
+ } keys %param
+ )
+ )
+ );
}
sub make_order_list {
- Fix javascript error in pkgreport.cgi (closes: #346043)
- When a bug can't be found in control@; indicate to user that it may
be archived. (closes: #153536)
+ - my_url in pkgreport.cgi now returns the complete url (closes: #378566)
+ - Document precisely how forwarded works (closes: #228049)
+ - Dissallow forwarded being set to a $gEmailDomain address
+ (closes: #397486)
- Fix broken sorting by usertags by forcing numeric (closes: #395027)
<p>Make sure that the <code>To</code> field of your message to the author
has only the author(s) address(es) in it; put both the person who
-reported the $gBug and
-<var>nnn</var><code>-forwarded\@$gEmailDomain</code> in the
+reported the $gBug,
+<var>nnn</var><code>-forwarded\@$gEmailDomain</code> and
+<var>nnn</var><code>\@$gEmailDomain</code> in the
<code>CC</code> field.
<p>Ask the author to preserve the <code>CC</code> to
$receivedat= "forwarded\@$gEmailDomain";
$markaswhat= 'forwarded';
$set_forwarded= $header{'to'};
+ # Dissallow forwarded being set to this bug tracking system
+ if (defined $set_forwarded and $set_forwarded =~ /\Q$gEmailDomain\E/) {
+ undef $set_forwarded;
+ }
if ( length( $gListDomain ) > 0 && length( $gForwardList ) > 0 ) {
push @generalcc, "$gForwardList\@$gListDomain";
$generalcc= "$gForwardList\@$gListDomain";
--- /dev/null
+# -*- mode: cperl;-*-
+
+use Test::More tests => 3;
+
+use warnings;
+use strict;
+
+use Storable qw(dclone);
+
+# First, lets create a dataset for the illustrious foo package
+
+my %data = (package => q(foo),
+ found_versions => ['bar/1.00',
+ '1.00',
+ '1.34',
+ ],
+ fixed_versions => ['bar/1.02',
+ '1.45',
+ ],
+ );
+
+
+require_ok('scripts/errorlib.in');
+# check removefoundversions
+my $data = dclone(\%data);
+removefoundversions($data,$data->{package},'1.00');
+is_deeply($data->{found_versions},['1.34'],'removefoundversions removes all 1.00 versions');
+$data = dclone(\%data);
+removefoundversions($data,$data->{package},'bar/1.00');
+is_deeply($data->{found_versions},['1.00','1.34'],'removefoundversions removes only bar/1.00 versions');