]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1032323: canonicalise_query() should omit parameters with empty values so generat...
authorEd Morley <emorley@mozilla.com>
Thu, 10 Jul 2014 06:28:31 +0000 (14:28 +0800)
committerByron Jones <glob@mozilla.com>
Thu, 10 Jul 2014 06:28:31 +0000 (14:28 +0800)
r=glob,a=sgreen

Bugzilla/CGI.pm

index 48b4fb0bfac59246dccc8c5bd3e4faa5bda11995..656c462b7124a5d79685e6382b02c7dc224decf6 100644 (file)
@@ -124,7 +124,8 @@ sub canonicalise_query {
         my $esc_key = url_quote($key);
 
         foreach my $value ($self->param($key)) {
-            if (defined($value)) {
+            # Omit params with an empty value
+            if (defined($value) && $value ne '') {
                 my $esc_value = url_quote($value);
 
                 push(@parameters, "$esc_key=$esc_value");
@@ -659,7 +660,9 @@ I<Bugzilla::CGI> also includes additional functions.
 
 =item C<canonicalise_query(@exclude)>
 
-This returns a sorted string of the parameters, suitable for use in a url.
+This returns a sorted string of the parameters whose values are non-empty,
+suitable for use in a url.
+
 Values in C<@exclude> are not included in the result.
 
 =item C<send_cookie>