]> 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:14:09 +0000 (10:14 -0800)
committerReed Loden <reed@reedloden.com>
Mon, 24 Jan 2011 18:14:09 +0000 (10:14 -0800)
[r=mkanat a=LpSolit]

chart.cgi

index 720050344054d58be4f9917c1272a6e35dce3ae6..c0e82db12baf0e84dfc9491e9d6bbd792fbcc4d2 100755 (executable)
--- a/chart.cgi
+++ b/chart.cgi
@@ -74,8 +74,8 @@ if (!Bugzilla->feature('new_charts')) {
 # 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;
 }
 
@@ -98,7 +98,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;
 }