From b3094393679a81704eec634f691020fe1c9b1110 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 30 Jan 2007 01:54:29 -0800 Subject: [PATCH] fix the arrayref leaking into the myurl function problem --- cgi/pkgreport.cgi | 31 +++++++++++++++---------------- debian/changelog | 1 + 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 444b6674..1f2294cf 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -418,12 +418,13 @@ if (defined $pkg || defined $src) { set_option("archive", !$archive); printf "

See the %s reports

", - urlsanit('pkgreport.cgi?'.join(';', - (map {$_ eq 'archive'?():("$_=$param{$_}") - } keys %param - ), - ('archive='.($archive?"no":"yes")) - ) + urlsanit(pkg_url(( + map { + $_ eq 'archive'?():($_,$param{$_}) + } keys %param + ), + ('archive',($archive?"no":"yes")) + ) ), ($archive ? "active" : "archived"); set_option("archive", $archive); @@ -463,10 +464,10 @@ if (defined $pkg) { } print " \n"; -my $includetags = htmlsanit(join(" ", grep { !m/^subj:/i } split /[\s,]+/, $include)); -my $excludetags = htmlsanit(join(" ", grep { !m/^subj:/i } split /[\s,]+/, $exclude)); -my $includesubj = htmlsanit(join(" ", map { s/^subj://i; $_ } grep { m/^subj:/i } split /[\s,]+/, $include)); -my $excludesubj = htmlsanit(join(" ", map { s/^subj://i; $_ } grep { m/^subj:/i } split /[\s,]+/, $exclude)); +my $includetags = htmlsanit(join(" ", grep { !m/^subj:/i } map {split /[\s,]+/} ref($include)?@{$include}:$include)); +my $excludetags = htmlsanit(join(" ", grep { !m/^subj:/i } map {split /[\s,]+/} ref($exclude)?@{$exclude}:$exclude)); +my $includesubj = htmlsanit(join(" ", map { s/^subj://i; $_ } grep { m/^subj:/i } map {split /[\s,]+/} ref($include)?@{$include}:$include)); +my $excludesubj = htmlsanit(join(" ", map { s/^subj://i; $_ } grep { m/^subj:/i } map {split /[\s,]+/} ref($exclude)?@{$exclude}:$exclude)); my $vismindays = ($mindays == 0 ? "" : $mindays); my $vismaxdays = ($maxdays == -1 ? "" : $maxdays); @@ -899,12 +900,10 @@ sub pkg_htmlselectarch { } sub myurl { - return urlsanit('pkgreport.cgi?'. - join(';', - (map {("$_=$param{$_}") - } keys %param - ) - ) + return urlsanit(pkg_url(map {exists $param{$_}?($_,$param{$_}):()} + qw(archive repeatmerged mindays maxdays), + qw(version dist arch pkg src tag maint submitter) + ) ); } diff --git a/debian/changelog b/debian/changelog index f3fb3944..87356ccf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -145,6 +145,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low - Fix broken sorting by usertags by forcing numeric (closes: #395027) - Add support for hiding useless messages; thanks to Sune Vuorela. (closes: #406020) + - Fix arrayrefs leaking into the myurl function (closes: #397344) -- Colin Watson Fri, 20 Jun 2003 18:57:25 +0100 -- 2.39.5