]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 621572: (CVE-2010-4572) [SECURITY] chart.cgi vulnerable to header-injection due...
authorReed Loden <reed@reedloden.com>
Mon, 24 Jan 2011 18:15:49 +0000 (10:15 -0800)
committerReed Loden <reed@reedloden.com>
Mon, 24 Jan 2011 18:15:49 +0000 (10:15 -0800)
[r=mkanat a=LpSolit]

chart.cgi

index 5da0d7b22cc6915f21c50dfdc99093794fe8f6b7..f3f5f5c61187eb72a46b1edb6f23d9fd572fb9db 100755 (executable)
--- a/chart.cgi
+++ b/chart.cgi
@@ -65,8 +65,8 @@ local our $vars = {};
 # Go back to query.cgi if we are adding a boolean chart parameter.
 if (grep(/^cmd-/, $cgi->param())) {
     my $params = $cgi->canonicalise_query("format", "ctype", "action");
-    print "Location: query.cgi?format=" . $cgi->param('query_format') .
-                                          ($params ? "&$params" : "") . "\n\n";
+    print $cgi->redirect("query.cgi?format=" . $cgi->param('query_format') .
+                                               ($params ? "&$params" : ""));
     exit;
 }
 
@@ -89,7 +89,7 @@ $action ||= "assemble";
 # Go to buglist.cgi if we are doing a search.
 if ($action eq "search") {
     my $params = $cgi->canonicalise_query("format", "ctype", "action");
-    print "Location: buglist.cgi" . ($params ? "?$params" : "") . "\n\n";
+    print $cgi->redirect("buglist.cgi" . ($params ? "?$params" : ""));
     exit;
 }