diff --git a/mozilla/webtools/bugzilla/buglist.cgi b/mozilla/webtools/bugzilla/buglist.cgi index 8c8f5200847..4e1a8eec455 100755 --- a/mozilla/webtools/bugzilla/buglist.cgi +++ b/mozilla/webtools/bugzilla/buglist.cgi @@ -83,7 +83,7 @@ else { } # Hack to support legacy applications that think the RDF ctype is at format=rdf. -if ($::FORM{'format'} eq "rdf" && !$::FORM{'ctype'}) { +if ($::FORM{'format'} && $::FORM{'format'} eq "rdf" && !$::FORM{'ctype'}) { $::FORM{'ctype'} = "rdf"; delete($::FORM{'format'}); } diff --git a/mozilla/webtools/bugzilla/globals.pl b/mozilla/webtools/bugzilla/globals.pl index f1e8f0d74b9..b52161eebd8 100644 --- a/mozilla/webtools/bugzilla/globals.pl +++ b/mozilla/webtools/bugzilla/globals.pl @@ -1631,6 +1631,7 @@ sub GetFormat { my ($template, $format, $ctype) = @_; $ctype ||= "html"; + $format ||= ""; # Security - allow letters and a hyphen only $ctype =~ s/[^a-zA-Z\-]//g;