aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%netscape.com <>1998-11-17 03:43:49 +0000
committerterry%netscape.com <>1998-11-17 03:43:49 +0000
commit0ca30382be83fccfc4e352096c87c56bbf8a673c (patch)
tree36342c8de0050b5bed4b67b29a14eb97e78c5e28
parent1cf02cc7c177a691ae9980f928ae30efb84a8c99 (diff)
downloadbugs-0ca30382be83fccfc4e352096c87c56bbf8a673c.tar
bugs-0ca30382be83fccfc4e352096c87c56bbf8a673c.tar.gz
bugs-0ca30382be83fccfc4e352096c87c56bbf8a673c.tar.bz2
bugs-0ca30382be83fccfc4e352096c87c56bbf8a673c.tar.xz
bugs-0ca30382be83fccfc4e352096c87c56bbf8a673c.zip
Patch by Andrew Anderson <andrew@redhat.com>. Many minor bugfixes and cleanup.
-rw-r--r--CGI.pl21
-rw-r--r--bug_form.pl2
-rwxr-xr-xbuglist.cgi137
-rwxr-xr-xchangepassword.cgi20
-rwxr-xr-xcolchange.cgi22
-rwxr-xr-xdoeditowners.cgi4
-rwxr-xr-xdoeditparams.cgi4
-rwxr-xr-xeditowners.cgi12
-rwxr-xr-xeditparams.cgi26
-rwxr-xr-xenter_bug.cgi8
-rwxr-xr-xpost_bug.cgi15
-rwxr-xr-xprocess_bug.cgi54
-rwxr-xr-xquery.cgi135
-rwxr-xr-xrelogin.cgi6
-rwxr-xr-xreports.cgi20
-rwxr-xr-xsanitycheck.cgi3
-rwxr-xr-xshow_bug.cgi15
17 files changed, 267 insertions, 237 deletions
diff --git a/CGI.pl b/CGI.pl
index f16640bc1..89768775a 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -39,8 +39,8 @@ sub GeneratePersonInput {
}
sub GeneratePeopleInput {
- my ($field, $def_value) = (@_);
- return "<INPUT NAME=\"$field\" SIZE=45 VALUE=\"$def_value\">";
+ my ($field, $size, $def_value) = (@_);
+ return "<INPUT NAME=\"$field\" SIZE=\"$size\" VALUE=\"$def_value\">";
}
@@ -187,15 +187,15 @@ sub make_options {
}
$last = $item;
if ($isregexp ? $item =~ $default : $default eq $item) {
- $popup .= "<OPTION SELECTED VALUE=\"$item\">$item";
+ $popup .= " <OPTION SELECTED VALUE=\"" . url_quote($item) . "\">" . url_decode($item) . "\n";
$found = 1;
} else {
- $popup .= "<OPTION VALUE=\"$item\">$item";
+ $popup .= " <OPTION VALUE=\"" . url_quote($item) . "\">" . url_decode($item) . "\n";
}
}
}
if (!$found && $default ne "") {
- $popup .= "<OPTION SELECTED>$default";
+ $popup .= " <OPTION SELECTED>$default\n";
}
return $popup;
}
@@ -203,9 +203,9 @@ sub make_options {
sub make_popup {
my ($name,$src,$default,$listtype,$onchange) = (@_);
- my $popup = "<SELECT NAME=$name";
+ my $popup = "<SELECT NAME=\"$name\"";
if ($listtype > 0) {
- $popup .= " SIZE=5";
+ $popup .= " SIZE=\"5\"";
if ($listtype == 2) {
$popup .= " MULTIPLE";
}
@@ -246,7 +246,8 @@ sub confirm_login {
if ($enteredlogin !~ /^[^@, ]*@[^@, ]*\.[^@, ]*$/) {
print "Content-type: text/html\n\n";
- print "<H1>Invalid e-mail address entered.</H1>\n";
+ PutHeader("Invalid e-mail address entered");
+
print "The e-mail address you entered\n";
print "(<b>$enteredlogin</b>) didn't match our minimal\n";
print "syntax checking for a legal email address. A legal\n";
@@ -302,7 +303,7 @@ To use the wonders of bugzilla, you can use the following:
my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2));
if ($realcryptpwd eq "" || $enteredcryptpwd ne $realcryptpwd) {
print "Content-type: text/html\n\n";
- print "<H1>Login failed.</H1>\n";
+ PutHeader("Login failed.");
print "The username or password you entered is not valid.\n";
print "Please click <b>Back</b> and try again.\n";
exit;
@@ -344,7 +345,7 @@ To use the wonders of bugzilla, you can use the following:
if ($loginok ne "1") {
print "Content-type: text/html\n\n";
- print "<H1>Please log in.</H1>\n";
+ PutHeader("Please log in.");
print "I need a legitimate e-mail address and password to continue.\n";
if (!defined $nexturl || $nexturl eq "") {
# Sets nexturl to be argv0, stripping everything up to and
diff --git a/bug_form.pl b/bug_form.pl
index ed6aead8a..287b6ad12 100644
--- a/bug_form.pl
+++ b/bug_form.pl
@@ -39,7 +39,7 @@ select
short_desc,
date_format(creation_ts,'Y-m-d')
from bugs
-where bug_id = $::FORM{'id'}";
+where bug_id = '" . $::FORM{'id'} . "'";
SendSQL($query);
my %bug;
diff --git a/buglist.cgi b/buglist.cgi
index 8439ccbbd..c0cf44d47 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -24,13 +24,18 @@ use strict;
require "CGI.pl";
-my $serverpush = 1;
+my $serverpush = 0;
-if ($ENV{'HTTP_USER_AGENT'} =~ /MSIE/) {
- # Internet explorer doesn't seem to understand server push. What fun.
- $serverpush = 0;
+# Internet explorer and Lynx don't seem to understand server push. What fun.
+# Carefully coded to cope with the fact that MSIE puts both "MSIE" and
+# "Mozilla" in its user agent string.
+
+$_ = $ENV{'HTTP_USER_AGENT'};
+if ($_ =~/Mozilla/ && $_ !~ /MSIE/) {
+ $serverpush = 1;
}
+
if ($serverpush) {
print "Content-type: multipart/x-mixed-replace;boundary=thisrandomstring\n";
print "\n";
@@ -63,46 +68,47 @@ if (!defined $::FORM{'cmdtype'}) {
CMD: for ($::FORM{'cmdtype'}) {
/^runnamed$/ && do {
$::buffer = $::COOKIE{"QUERY_" . $::FORM{"namedcmd"}};
- ProcessFormFields $::buffer;
+ ProcessFormFields($::buffer);
last CMD;
};
/^editnamed$/ && do {
my $url = "query.cgi?" . $::COOKIE{"QUERY_" . $::FORM{"namedcmd"}};
print "Content-type: text/html
-Refresh: 0; URL=$url
+Refresh: 0; URL=$url\n\n";
-<TITLE>What a hack.</TITLE>
+PutHeader("What a hack.");
+print "
Loading your query named <B>$::FORM{'namedcmd'}</B>...";
exit;
};
/^forgetnamed$/ && do {
print "Set-Cookie: QUERY_" . $::FORM{'namedcmd'} . "= ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT
-Content-type: text/html
+Content-type: text/html\n\n";
-<HTML>
-<TITLE>Forget what?</TITLE>
+PutHeader("Forget what?");
+print "
OK, the <B>$::FORM{'namedcmd'}</B> query is gone.
<P>
-<A HREF=query.cgi>Go back to the query page.</A>";
+<A HREF=\"query.cgi\">Go back to the query page.</A>
+";
exit;
};
/^asnamed$/ && do {
if ($::FORM{'newqueryname'} =~ /^[a-zA-Z0-9_ ]+$/) {
print "Set-Cookie: QUERY_" . $::FORM{'newqueryname'} . "=$::buffer ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT
-Content-type: text/html
+Content-type: text/html\n\n";
-<HTML>
-<TITLE>OK, done.</TITLE>
+PutHeader("OK, done.");
+print "
OK, you now have a new query named <B>$::FORM{'newqueryname'}</B>.
-
<P>
-
-<A HREF=query.cgi>Go back to the query page.</A>";
+<A HREF=\"query.cgi\">Go back to the query page.</A>
+";
} else {
- print "Content-type: text/html
+ print "Content-type: text/html\n\n";
-<HTML>
-<TITLE>Picky, picky.</TITLE>
+PutHeader("Picky, picky.");
+print "
Query names can only have letters, digits, spaces, or underbars. You entered
\"<B>$::FORM{'newqueryname'}</B>\", which doesn't cut it.
<P>
@@ -112,15 +118,15 @@ Click the <B>Back</B> button and type in a valid name for this query.";
};
/^asdefault$/ && do {
print "Set-Cookie: DEFAULTQUERY=$::buffer ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT
-Content-type: text/html
+Content-type: text/html\n\n";
-<HTML>
-<TITLE>OK, default is set.</TITLE>
+PutHeader("OK, default is set.");
+print "
OK, you now have a new default query.
<P>
-<A HREF=query.cgi>Go back to the query page, using the new default.</A>";
+<A HREF=\"query.cgi\">Go back to the query page, using the new default.</A>";
exit;
};
}
@@ -225,7 +231,8 @@ if (defined $::FORM{'sql'}) {
}
} else {
my $ref = $::MFORM{$field};
- foreach my $v (@$ref) {
+ foreach my $vv (@$ref) {
+ my $v = url_decode($vv);
if ($v eq "(empty)") {
$query .= "\t\t${or}bugs.$field is null\n";
} else {
@@ -328,20 +335,20 @@ if (defined $::FORM{'order'}) {
}
if ($dotweak) {
- pnl "<FORM NAME=changeform METHOD=POST ACTION=\"process_bug.cgi\">";
+ pnl "<FORM NAME=\"changeform\" METHOD=\"POST\" ACTION=\"process_bug.cgi\">";
}
-my $tablestart = "<TABLE CELLSPACING=0 CELLPADDING=2>
-<TR ALIGN=LEFT><TH>
+my $tablestart = "<TABLE CELLSPACING=\"0\" CELLPADDING=\"2\">
+<TR ALIGN=\"LEFT\"><TH>
<A HREF=\"buglist.cgi?$fields&order=bugs.bug_id\">ID</A>";
foreach my $c (@collist) {
if (exists $::needquote{$c}) {
if ($::needquote{$c}) {
- $tablestart .= "<TH WIDTH=100% valigh=left>";
+ $tablestart .= "<TH WIDTH=\"100%\" valigh=\"left\">";
} else {
- $tablestart .= "<TH valign=left>";
+ $tablestart .= "<TH valign=\"left\">";
}
if (defined $::sortkey{$c}) {
$tablestart .= "<A HREF=\"buglist.cgi?$fields&order=$::sortkey{$c}$oldorder\">$::title{$c}</A>";
@@ -370,9 +377,9 @@ while (@row = FetchSQLData()) {
pnl "</TABLE>$tablestart";
}
push @bugarray, $bug_id;
- pnl "<TR VALIGN=TOP ALIGN=LEFT><TD>";
+ pnl "<TR VALIGN=\"TOP\" ALIGN=\"LEFT\"><TD>";
if ($dotweak) {
- pnl "<input type=checkbox name=id_$bug_id>";
+ pnl "<input type=\"checkbox\" name=\"id_$bug_id\">";
}
pnl "<A HREF=\"show_bug.cgi?id=$bug_id\">";
pnl "$bug_id</A> ";
@@ -448,9 +455,9 @@ if (open (COMMENTS, "<data/comments")) {
}
-print "<HR><I><A HREF=newquip.html>$quip\n";
+print "<HR><I><A HREF=\"newquip.html\">$quip\n";
print "</I></A></CENTER>\n";
-print "<HR SIZE=10>$tablestart\n";
+print "<HR SIZE=\"10\">$tablestart\n";
print $::bugl;
print "</TABLE>\n";
@@ -473,7 +480,7 @@ function SetCheckboxes(value) {
item.checked = value;
}
}
-document.write(\" <input type=button value=\\\"Uncheck All\\\" onclick=\\\"SetCheckboxes(false);\\\"> <input type=button value=\\\"Check All\\\" onclick=\\\"SetCheckboxes(true);\\\">\");
+document.write(\" <input type=\\\"button\\\" value=\\\"Uncheck All\\\" onclick=\\\"SetCheckboxes(false);\\\"> <input type=\\\"button\\\" value=\\\"Check All\\\" onclick=\\\"SetCheckboxes(true);\\\">\");
</SCRIPT>";
my $resolution_popup = make_options(\@::legal_resolution_no_dup, "FIXED");
my @prod_list = keys %prodhash;
@@ -497,52 +504,52 @@ document.write(\" <input type=button value=\\\"Uncheck All\\\" onclick=\\\"SetCh
<hr>
<TABLE>
<TR>
- <TD ALIGN=RIGHT><B>Product:</B></TD>
- <TD><SELECT NAME=product>$product_popup</SELECT></TD>
- <TD ALIGN=RIGHT><B>Version:</B></TD>
- <TD><SELECT NAME=version>$version_popup</SELECT></TD>
+ <TD ALIGN=\"RIGHT\"><B>Product:</B></TD>
+ <TD><SELECT NAME=\"product\">$product_popup</SELECT></TD>
+ <TD ALIGN=\"RIGHT\"><B>Version:</B></TD>
+ <TD><SELECT NAME=\"version\">$version_popup</SELECT></TD>
<TR>
- <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></TD>
- <TD><SELECT NAME=rep_platform>$platform_popup</SELECT></TD>
- <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority:</A></B></TD>
- <TD><SELECT NAME=priority>$priority_popup</SELECT></TD>
+ <TD ALIGN=\"RIGHT\"><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></TD>
+ <TD><SELECT NAME=\"rep_platform\">$platform_popup</SELECT></TD>
+ <TD ALIGN=\"RIGHT\"><B><A HREF=\"bug_status.html#priority\">Priority:</A></B></TD>
+ <TD><SELECT NAME=\"priority\">$priority_popup</SELECT></TD>
</TR>
<TR>
- <TD ALIGN=RIGHT><B>Component:</B></TD>
- <TD><SELECT NAME=component>$component_popup</SELECT></TD>
- <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
- <TD><SELECT NAME=bug_severity>$sev_popup</SELECT></TD>
+ <TD ALIGN=\"RIGHT\"><B>Component:</B></TD>
+ <TD><SELECT NAME=\"component\">$component_popup</SELECT></TD>
+ <TD ALIGN=\"RIGHT\"><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
+ <TD><SELECT NAME=\"bug_severity\">$sev_popup</SELECT></TD>
</TR>
</TABLE>
-<INPUT NAME=multiupdate value=Y TYPE=hidden>
+<INPUT NAME=\"multiupdate\" value=\"Y\" TYPE=\"hidden\">
<B>Additional Comments:</B>
<BR>
-<TEXTAREA WRAP=HARD NAME=comment ROWS=5 COLS=80></TEXTAREA><BR>";
+<TEXTAREA WRAP=\"HARD\" NAME=\"comment\" ROWS=\"5\" COLS=\"80\"></TEXTAREA><BR>";
# knum is which knob number we're generating, in javascript terms.
my $knum = 0;
print "
-<INPUT TYPE=radio NAME=knob VALUE=none CHECKED>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"none\" CHECKED>
Do nothing else<br>";
$knum++;
print "
-<INPUT TYPE=radio NAME=knob VALUE=accept>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"accept\">
Accept bugs (change status to <b>ASSIGNED</b>)<br>";
$knum++;
if (!defined $statushash{'CLOSED'} &&
!defined $statushash{'VERIFIED'} &&
!defined $statushash{'RESOLVED'}) {
print "
-<INPUT TYPE=radio NAME=knob VALUE=clearresolution>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"clearresolution\">
Clear the resolution<br>";
$knum++;
print "
-<INPUT TYPE=radio NAME=knob VALUE=resolve>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"resolve\">
Resolve bugs, changing <A HREF=\"bug_status.html\">resolution</A> to
- <SELECT NAME=resolution
+ <SELECT NAME=\"resolution\"
ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\">
$resolution_popup</SELECT><br>";
$knum++;
@@ -551,38 +558,38 @@ document.write(\" <input type=button value=\\\"Uncheck All\\\" onclick=\\\"SetCh
!defined $statushash{'ASSIGNED'} &&
!defined $statushash{'REOPENED'}) {
print "
-<INPUT TYPE=radio NAME=knob VALUE=reopen> Reopen bugs<br>";
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"reopen\"> Reopen bugs<br>";
$knum++;
}
my @statuskeys = keys %statushash;
if ($#statuskeys == 1) {
if (defined $statushash{'RESOLVED'}) {
print "
-<INPUT TYPE=radio NAME=knob VALUE=verify>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"verify\">
Mark bugs as <b>VERIFIED</b><br>";
$knum++;
}
if (defined $statushash{'VERIFIED'}) {
print "
-<INPUT TYPE=radio NAME=knob VALUE=close>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"close\">
Mark bugs as <b>CLOSED</b><br>";
$knum++;
}
}
print "
-<INPUT TYPE=radio NAME=knob VALUE=reassign>
+<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"reassign\">
<A HREF=\"bug_status.html#assigned_to\">Reassign</A> bugs to
- <INPUT NAME=assigned_to SIZE=32
+ <INPUT NAME=\"assigned_to\" SIZE=\"32\"
ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\"
VALUE=\"$::COOKIE{'Bugzilla_login'}\"><br>";
$knum++;
- print "<INPUT TYPE=radio NAME=knob VALUE=reassignbycomponent>
+ print "<INPUT TYPE=\"radio\" NAME=\"knob\" VALUE=\"reassignbycomponent\">
Reassign bugs to owner of selected component<br>";
$knum++;
print "
<p>
-<font size=-1>
+<font size=\"-1\">
To make changes to a bunch of bugs at once:
<ol>
<li> Put check boxes next to the bugs you want to change.
@@ -590,15 +597,15 @@ To make changes to a bunch of bugs at once:
comment explaining what you're doing.)
<li> Click the below \"Commit\" button.
</ol></font>
-<INPUT TYPE=SUBMIT VALUE=Commit>
+<INPUT TYPE=\"SUBMIT\" VALUE=\"Commit\">
</FORM><hr>\n";
}
if ($count > 0) {
- print "<FORM METHOD=POST ACTION=\"long_list.cgi\">
-<INPUT TYPE=HIDDEN NAME=buglist VALUE=$buglist>
-<INPUT TYPE=SUBMIT VALUE=\"Long Format\">
+ print "<FORM METHOD=\"POST\" ACTION=\"long_list.cgi\">
+<INPUT TYPE=\"HIDDEN\" NAME=\"buglist\" VALUE=\"$buglist\">
+<INPUT TYPE=\"SUBMIT\" VALUE=\"Long Format\">
<A HREF=\"query.cgi\">Query Page</A>
<A HREF=\"colchange.cgi?$::buffer\">Change columns</A>
</FORM>";
diff --git a/changepassword.cgi b/changepassword.cgi
index a3a17e39a..37543768b 100755
--- a/changepassword.cgi
+++ b/changepassword.cgi
@@ -24,20 +24,20 @@ require "CGI.pl";
confirm_login();
if (! defined $::FORM{'pwd1'}) {
- print "Content-type: text/html
-
-<H1>Change your password</H1>
-<form method=post>
+ print "Content-type: text/html\n\n";
+ PutHeader("Change your password");
+ print "
+<FORM METHOD=\"post\">
<table>
<tr>
-<td align=right>Please enter the new password for <b>$::COOKIE{'Bugzilla_login'}</b>:</td>
-<td><input type=password name=pwd1></td>
+<TD ALIGN=\"right\">Please enter the new password for <b>$::COOKIE{'Bugzilla_login'}</b>:</td>
+<TD><INPUT TYPE=\"password\" NAME=\"pwd1\"></td>
</tr>
<tr>
-<td align=right>Re-enter your new password:</td>
-<td><input type=password name=pwd2></td>
+<TD ALIGN=\"right\">Re-enter your new password:</td>
+<TD><INPUT TYPE=\"password\" name=\"pwd2\"></td>
</table>
-<input type=submit value=Submit>\n";
+<INPUT TYPE=\"submit\" VALUE=\"Submit\">\n";
exit;
}
@@ -85,4 +85,4 @@ SendSQL("update logincookies set cryptpassword = '$encrypted' where cookie = $::
print "<H1>OK, done.</H1>
Your new password has been set.
<p>
-<a href=query.cgi>Back to query page.</a>\n";
+<A HREF=\"query.cgi\">Back to query page.</A>\n";
diff --git a/colchange.cgi b/colchange.cgi
index bd3b23d6f..32fe1bb43 100755
--- a/colchange.cgi
+++ b/colchange.cgi
@@ -24,8 +24,6 @@ use strict;
require "CGI.pl";
-print "Content-type: text/html\n";
-
# The master list not only says what fields are possible, but what order
# they get displayed in.
@@ -49,8 +47,8 @@ if (defined $::FORM{'rememberedquery'}) {
my $list = join(" ", @collist);
print "Set-Cookie: COLUMNLIST=$list ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n";
- print "\n";
- print "<TITLE>What a hack.</TITLE>\n";
+ print "Content-type: text/html\n\n";
+ PutHeader("What a hack");
print "Resubmitting your query with new columns...\n";
exit;
}
@@ -61,6 +59,9 @@ if (defined $::COOKIE{'COLUMNLIST'}) {
@collist = @::default_column_list;
}
+print "Content-type: text/html\n\n";
+
+PutHeader("Column Change");
my %desc;
foreach my $i (@masterlist) {
@@ -71,12 +72,11 @@ $desc{'summary'} = "Summary (first 60 characters)";
$desc{'summaryfull'} = "Full Summary";
-print "\n";
print "Check which columns you wish to appear on the list, and then click\n";
print "on submit.\n";
print "<p>\n";
-print "<FORM ACTION=colchange.cgi>\n";
-print "<INPUT TYPE=HIDDEN NAME=rememberedquery VALUE=$::buffer>\n";
+print "<FORM ACTION=\"colchange.cgi\">\n";
+print "<INPUT TYPE=\"HIDDEN\" NAME=\"rememberedquery\" VALUE=\"$::buffer\">\n";
foreach my $i (@masterlist) {
my $c;
@@ -85,13 +85,13 @@ foreach my $i (@masterlist) {
} else {
$c = '';
}
- print "<INPUT TYPE=checkbox NAME=column_$i $c>$desc{$i}<br>\n";
+ print "<INPUT TYPE=\"checkbox\" NAME=\"column_$i\" $c>$desc{$i}<br>\n";
}
print "<P>\n";
print "<INPUT TYPE=\"submit\" VALUE=\"Submit\">\n";
print "</FORM>\n";
-print "<FORM ACTION=colchange.cgi>\n";
-print "<INPUT TYPE=HIDDEN NAME=rememberedquery VALUE=$::buffer>\n";
-print "<INPUT TYPE=HIDDEN NAME=resetit VALUE=1>\n";
+print "<FORM ACTION=\"colchange.cgi\">\n";
+print "<INPUT TYPE=\"HIDDEN\" NAME=\"rememberedquery\" VALUE=\"$::buffer\">\n";
+print "<INPUT TYPE=\"HIDDEN\" NAME=\"resetit\" VALUE=\"1\">\n";
print "<INPUT TYPE=\"submit\" VALUE=\"Reset to Bugzilla default\">\n";
print "</FORM>\n";
diff --git a/doeditowners.cgi b/doeditowners.cgi
index b09d7298b..88bfdeb65 100755
--- a/doeditowners.cgi
+++ b/doeditowners.cgi
@@ -68,5 +68,5 @@ foreach my $update (@updates) {
}
print "OK, done.<p>\n";
-print "<a href=editowners.cgi>Edit the owners some more.</a><p>\n";
-print "<a href=query.cgi>Go back to the query page.</a>\n";
+print "<A HREF=\"editowners.cgi\">Edit the owners some more.</A>\n<P>\n";
+print "<A HREF=\"query.cgi\">Go back to the query page.</A>\n";
diff --git a/doeditparams.cgi b/doeditparams.cgi
index e43fd73ce..514fdbd7d 100755
--- a/doeditparams.cgi
+++ b/doeditparams.cgi
@@ -70,6 +70,6 @@ foreach my $i (@::param_list) {
WriteParams();
print "OK, done.<p>\n";
-print "<a href=editparams.cgi>Edit the params some more.</a><p>\n";
-print "<a href=query.cgi>Go back to the query page.</a>\n";
+print "<A HREF=\"editparams.cgi\">Edit the params some more.</A>\n<P>\n";
+print "<A HREF=\"query.cgi\">Go back to the query page.</A>\n";
diff --git a/editowners.cgi b/editowners.cgi
index 1bfb6ac13..647bdeda0 100755
--- a/editowners.cgi
+++ b/editowners.cgi
@@ -44,9 +44,9 @@ PutHeader("Edit Component Owners");
print "This lets you edit the owners of the program components of bugzilla.\n";
-print "<form method=post action=doeditowners.cgi><table>\n";
+print "<FORM METHOD=\"POST\" ACTION=\"doeditowners.cgi\">\n<TABLE>\n";
-my $rowbreak = "<tr><td colspan=2><hr></td></tr>";
+my $rowbreak = "<TR><TD COLSPAN=\"2\"><HR></TD></TR>";
SendSQL("select program, value, initialowner from components order by program, value");
@@ -56,17 +56,17 @@ my $curProgram = "";
while (@line = FetchSQLData()) {
if ($line[0] ne $curProgram) {
print $rowbreak;
- print "<tr><th align=right valign=top>$line[0]:</th><td></td></tr>\n";
+ print "<TR><TH ALIGN=\"RIGHT\" VALIGN=\"TOP\">$line[0]:</TH><TD></TD></TR>\n";
$curProgram = $line[0];
}
- print "<tr><td valign = top>$line[1]</td><td><input size=80 ";
+ print "<TR><TD VALIGN=\"TOP\">$line[1]</TD><TD><INPUT SIZE=\"80\" ";
print "name=\"$line[0]_$line[1]\" value=\"$line[2]\"></td></tr>\n";
}
print "</table>\n";
-print "<input type=submit value=\"Submit changes\">\n";
+print "<INPUT TYPE=\"submit\" VALUE=\"Submit changes\">\n";
print "</form>\n";
-print "<p><a href=query.cgi>Skip all this, and go back to the query page</a>\n";
+print "<P><A HREF=\"query.cgi\">Skip all this, and go back to the query page</A>\n";
diff --git a/editparams.cgi b/editparams.cgi
index f926c0ae9..b00071956 100755
--- a/editparams.cgi
+++ b/editparams.cgi
@@ -49,23 +49,23 @@ print "Be careful!\n";
print "<p>\n";
print "Any item you check Reset on will get reset to its default value.\n";
-print "<form method=post action=doeditparams.cgi><table>\n";
+print "<FORM METHOD=\"POST\" ACTION=\"doeditparams.cgi\">\n<TABLE>\n";
-my $rowbreak = "<tr><td colspan=2><hr></td></tr>";
+my $rowbreak = "<TR><TD COLSPAN=\"2\"><HR></TD></TR>";
print $rowbreak;
foreach my $i (@::param_list) {
- print "<tr><th align=right valign=top>$i:</th><td>$::param_desc{$i}</td></tr>\n";
- print "<tr><td valign=top><input type=checkbox name=reset-$i>Reset</td><td>\n";
+ print "<TR><TH ALIGN=\"RIGHT\" VALIGN=\"TOP\">$i:</TH><TD>$::param_desc{$i}</TD></TR>\n";
+ print "<TR><TD VALIGN=\"TOP\"><INPUT TYPE=\"checkbox\" NAME=\"reset-$i\">Reset</TD><TD>\n";
my $value = Param($i);
SWITCH: for ($::param_type{$i}) {
/^t$/ && do {
- print "<input size=80 name=$i value=\"" .
+ print "<INPUT SIZE=\"80\" NAME=\"$i\" VALUE=\"" .
value_quote($value) . '">\n';
last SWITCH;
};
/^l$/ && do {
- print "<textarea wrap=hard name=$i rows=10 cols=80>" .
+ print "<TEXTAREA WRAP=\"HARD\" NAME=\"$i\" ROWS=\"10\" COLS=\"80\">" .
value_quote($value) . "</textarea>\n";
last SWITCH;
};
@@ -79,18 +79,18 @@ foreach my $i (@::param_list) {
$on = "";
$off = "checked";
}
- print "<input type=radio name=$i value=1 $on>On\n";
- print "<input type=radio name=$i value=0 $off>Off\n";
+ print "<INPUT TYPE=\"radio\" NAME=\"$i\" VALUE=\"1\" $on>On\n";
+ print "<INPUT TYPE=\"radio\" NAME=\"$i\" VALUE=\"0\" $off>Off\n";
last SWITCH;
};
# DEFAULT
- print "<font color=red><blink>Unknown param type $::param_type{$i}!!!</blink></font>\n";
+ print "<FONT COLOR=\"red\"><BLINK>Unknown param type $::param_type{$i}!!!</BLINK></FONT>\n";
}
print "</td></tr>\n";
print $rowbreak;
}
-print "<tr><th align=right valign=top>version:</th><td>
+print "<TR><TH ALIGN=\"RIGHT\" VALIGN=\"TOP\">version:</TH><TD>
What version of Bugzilla this is. This can't be modified here, but
<tt>%version%</tt> can be used as a parameter in places that understand
such parameters</td></tr>
@@ -98,9 +98,9 @@ such parameters</td></tr>
print "</table>\n";
-print "<input type=reset value=\"Reset form\"><br>\n";
-print "<input type=submit value=\"Submit changes\">\n";
+print "<INPUT TYPE=\"reset\" VALUE=\"Reset form\"><BR>\n";
+print "<INPUT TYPE=\"submit\" VALUE=\"Submit changes\">\n";
print "</form>\n";
-print "<p><a href=query.cgi>Skip all this, and go back to the query page</a>\n";
+print "<P><A HREF=\"query.cgi\">Skip all this, and go back to the query page</A>\n";
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 529c394b8..893a992da 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -43,9 +43,9 @@ if (!defined $::FORM{'product'}) {
print "a bug.</H2>\n";
print "<table>";
foreach my $p (sort (@prodlist)) {
- print "<tr><th align=right valign=top><a href=\"enter_bug.cgi?product=" . url_quote($p) . "\"&$::buffer>$p</a>:</th>\n";
+ print "<TR><TH ALIGN=\"RIGHT\" VALIGN=\"TOP\"><A HREF=\"enter_bug.cgi?product=" . url_quote($p) . "\"&$::buffer>$p</A>:</TH>\n";
if (defined $::proddesc{$p}) {
- print "<td valign=top>$::proddesc{$p}</td>\n";
+ print "<TD VALIGN=\"TOP\">$::proddesc{$p}</TD>\n";
}
print "</tr>";
}
@@ -55,7 +55,7 @@ if (!defined $::FORM{'product'}) {
$::FORM{'product'} = $prodlist[0];
}
-my $product = $::FORM{'product'};
+my $product = url_decode($::FORM{'product'});
confirm_login();
@@ -149,7 +149,7 @@ GetVersionTable();
my $assign_element = GeneratePersonInput('assigned_to', 1,
formvalue('assigned_to'));
-my $cc_element = GeneratePeopleInput('cc', formvalue('cc'));
+my $cc_element = GeneratePeopleInput('cc', 45, formvalue('cc'));
my $priority_popup = make_popup('priority', \@::legal_priority,
diff --git a/post_bug.cgi b/post_bug.cgi
index 3ea3b070f..52885a535 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -18,6 +18,7 @@
# Netscape Communications Corporation. All Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Andrew Anderson <andrew@redhat.com>
use diagnostics;
@@ -34,17 +35,19 @@ $zz = $zz . $zz;
confirm_login();
-print "Set-Cookie: PLATFORM=$::FORM{'product'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
-print "Set-Cookie: VERSION-$::FORM{'product'}=$::FORM{'version'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+my $platform = url_quote($::FORM{'product'});
+my $version = url_quote($::FORM{'version'});
+
+print "Set-Cookie: PLATFORM=$platform ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+print "Set-Cookie: VERSION-$platform=$version ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
print "Content-type: text/html\n\n";
if (defined $::FORM{'maketemplate'}) {
- print "<TITLE>Bookmarks are your friend.</TITLE>\n";
- print "<H1>Template constructed.</H1>\n";
+ PutHeader("Bookmarks are your friend.", "Template constructed.");
my $url = "enter_bug.cgi?$::buffer";
- print "If you put a bookmark <a href=\"$url\">to this link</a>, it will\n";
+ print "If you put a bookmark <A HREF=\"$url\">to this link</A>, it will\n";
print "bring up the submit-a-new-bug page with the fields initialized\n";
print "as you've requested.\n";
exit;
@@ -118,6 +121,8 @@ foreach my $person (keys %ccids) {
print "<H2>Changes Submitted</H2>\n";
print "<A HREF=\"show_bug.cgi?id=$id\">Show BUG# $id</A>\n";
print "<BR><A HREF=\"query.cgi\">Back To Query Page</A>\n";
+print "<BR><A HREF=\"enter_bug.cgi?product=" . url_quote($::FORM{'product'}). "\">Enter a new bug</A>\n";
+
system("./processmail $id < /dev/null > /dev/null 2> /dev/null &");
exit;
diff --git a/process_bug.cgi b/process_bug.cgi
index 6755ce91c..785ba1b29 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -37,7 +37,7 @@ print "Content-type: text/html\n\n";
GetVersionTable();
if ($::FORM{'product'} ne $::dontchange) {
- my $prod = $::FORM{'product'};
+ my $prod = url_decode($::FORM{'product'});
my $vok = lsearch($::versions{$prod}, $::FORM{'version'}) >= 0;
my $cok = lsearch($::components{$prod}, $::FORM{'component'}) >= 0;
if (!$vok || !$cok) {
@@ -49,26 +49,26 @@ if ($::FORM{'product'} ne $::dontchange) {
print "<form>\n";
print "<table>\n";
print "<tr>\n";
- print "<td align=right><b>Product:</b></td>\n";
+ print "<td align=\"right\"><b>Product:</b></td>\n";
print "<td>$prod</td>\n";
print "</tr><tr>\n";
- print "<td align=right><b>Version:</b></td>\n";
+ print "<td align=\"right\"><b>Version:</b></td>\n";
print "<td>" . Version_element($::FORM{'version'}, $prod) . "</td>\n";
print "</tr><tr>\n";
- print "<td align=right><b>Component:</b></td>\n";
+ print "<td align=\"right\"><b>Component:</b></td>\n";
print "<td>" . Component_element($::FORM{'component'}, $prod) . "</td>\n";
print "</tr>\n";
print "</table>\n";
foreach my $i (keys %::FORM) {
if ($i ne 'version' && $i ne 'component') {
- print "<input type=hidden name=$i value=\"" .
+ print "<input type=\"hidden\" name=\"$i\" value=\"" .
value_quote($::FORM{$i}) . "\">\n";
}
}
- print "<input type=submit value=Commit>\n";
+ print "<input type=\"submit\" value=\"Commit\">\n";
print "</form>\n";
print "</hr>\n";
- print "<a href=query.cgi>Cancel all this and go back to the query page.</a>\n";
+ print "<A HREF=\"query.cgi\">Cancel all this and go back to the query page.</A>\n";
exit;
}
}
@@ -89,11 +89,6 @@ if (!defined $::FORM{'who'}) {
$::FORM{'who'} = $::COOKIE{'Bugzilla_login'};
}
-print "<TITLE>Update Bug " . join(" ", @idlist) . "</TITLE>\n";
-if (defined $::FORM{'id'}) {
- navigation_header();
-}
-print "<HR>\n";
$::query = "update bugs\nset";
$::comma = "";
umask(0);
@@ -119,6 +114,7 @@ sub ChangeResolution {
}
}
+ConnectToDatabase();
foreach my $field ("rep_platform", "priority", "bug_severity", "url",
"summary", "component", "bug_file_loc", "short_desc",
@@ -126,15 +122,11 @@ foreach my $field ("rep_platform", "priority", "bug_severity", "url",
if (defined $::FORM{$field}) {
if ($::FORM{$field} ne $::dontchange) {
DoComma();
- $::query .= "$field = " . SqlQuote($::FORM{$field});
+ $::query .= "$field = " . SqlQuote(url_decode($::FORM{$field}));
}
}
}
-
-
-ConnectToDatabase();
-
SWITCH: for ($::FORM{'knob'}) {
/^none$/ && do {
last SWITCH;
@@ -177,6 +169,7 @@ SWITCH: for ($::FORM{'knob'}) {
};
/^reopen$/ && do {
ChangeStatus('REOPENED');
+ ChangeResolution('');
last SWITCH;
};
/^verify$/ && do {
@@ -197,7 +190,8 @@ SWITCH: for ($::FORM{'knob'}) {
exit;
}
if ($::FORM{'dup_id'} == $::FORM{'id'}) {
- print "Nice try. But it doesn't really make sense to mark a\n";
+ PutHeader("Nice try.");
+ print "But it doesn't really make sense to mark a\n";
print "bug as a duplicate of itself, does it?\n";
exit;
}
@@ -213,6 +207,7 @@ SWITCH: for ($::FORM{'knob'}) {
if ($#idlist < 0) {
+ PutHeader("Nothing to modify");
print "You apparently didn't choose any bugs to modify.\n";
print "<p>Click <b>Back</b> and try again.\n";
exit;
@@ -231,7 +226,7 @@ my $basequery = $::query;
sub SnapShotBug {
my ($id) = (@_);
SendSQL("select " . join(',', @::log_columns) .
- " from bugs where bug_id = $id");
+ " from bugs where bug_id = '" . $id . "'");
return FetchSQLData();
}
@@ -240,7 +235,7 @@ foreach my $id (@idlist) {
SendSQL("lock tables bugs write, bugs_activity write, cc write, profiles write");
my @oldvalues = SnapShotBug($id);
- my $query = "$basequery\nwhere bug_id = $id";
+ my $query = "$basequery\nwhere bug_id = '" . $id . "'";
# print "<PRE>$query</PRE>\n";
@@ -261,7 +256,7 @@ foreach my $id (@idlist) {
}
}
- SendSQL("delete from cc where bug_id = $id");
+ SendSQL("delete from cc where bug_id = '" . $id . "'");
foreach my $ccid (keys %ccids) {
SendSQL("insert into cc (bug_id, who) values ($id, $ccid)");
}
@@ -276,7 +271,8 @@ foreach my $id (@idlist) {
if ($old ne $new) {
if (!defined $whoid) {
$whoid = DBNameToIdAndCheck($::FORM{'who'});
- SendSQL("select delta_ts from bugs where bug_id = $id");
+ $query = "select delta_ts from bugs where bug_id = '" . $id . "'";
+ SendSQL($query);
$timestamp = FetchOneColumn();
}
if ($col eq 'assigned_to') {
@@ -287,13 +283,21 @@ foreach my $id (@idlist) {
$old = SqlQuote($old);
$new = SqlQuote($new);
my $q = "insert into bugs_activity (bug_id,who,when,field,oldvalue,newvalue) values ($id,$whoid,$timestamp,$col,$old,$new)";
- # puts "<pre>$q</pre>"
+ # print "<pre>$q</pre>";
SendSQL($q);
}
}
- print "<TABLE BORDER=1><TD><H1>Changes Submitted</H1>\n";
- print "<TD><A HREF=\"show_bug.cgi?id=$id\">Back To BUG# $id</A></TABLE>\n";
+
+ PutHeader("Changes submitted for bug $::FORM{'id'}",
+ "Changes Submitted", $::FORM{'id'});
+ if (defined $::FORM{'id'}) {
+ navigation_header();
+ }
+ print "<HR>\n<P>\n";
+ print "<A HREF=\"show_bug.cgi?id=$id\">Back To BUG# $id</A>\n";
+ print "<BR><A HREF=\"query.cgi\">Back To Query Page</A>\n";
+ print "<BR><A HREF=\"enter_bug.cgi\">Enter a new bug</A>\n";
SendSQL("unlock tables");
diff --git a/query.cgi b/query.cgi
index b24dee0f3..ccac365de 100755
--- a/query.cgi
+++ b/query.cgi
@@ -99,8 +99,8 @@ print "Set-Cookie: BUGLIST=
Content-type: text/html\n\n";
GetVersionTable();
-my $who = GeneratePeopleInput("assigned_to", $default{"assigned_to"});
-my $reporter = GeneratePeopleInput("reporter", $default{"reporter"});
+my $who = GeneratePeopleInput("assigned_to", 45, $default{"assigned_to"});
+my $reporter = GeneratePeopleInput("reporter", 45, $default{"reporter"});
# Muck the "legal product" list so that the default one is always first (and
@@ -118,97 +118,102 @@ PutHeader("Bugzilla Query Page", "Query Page");
push @::legal_resolution, "---"; # Oy, what a hack.
print "
-<FORM NAME=queryForm METHOD=GET ACTION=\"buglist.cgi\">
+<FORM NAME=\"queryForm\" METHOD=\"GET\" ACTION=\"buglist.cgi\">
<table>
<tr>
-<th align=left><A HREF=\"bug_status.html\">Status</a>:</th>
-<th align=left><A HREF=\"bug_status.html\">Resolution</a>:</th>
-<th align=left><A HREF=\"bug_status.html#rep_platform\">Platform</a>:</th>
-<th align=left><A HREF=\"bug_status.html#priority\">Priority</a>:</th>
-<th align=left><A HREF=\"bug_status.html#severity\">Severity</a>:</th>
+<th align=\"left\"><A HREF=\"bug_status.html\">Status</a>:</th>
+<th align=\"left\"><A HREF=\"bug_status.html\">Resolution</a>:</th>
+<th align=\"left\"><A HREF=\"bug_status.html#rep_platform\">Platform</a>:</th>
+<th align=\"left\"><A HREF=\"bug_status.html#priority\">Priority</a>:</th>
+<th align=\"left\"><A HREF=\"bug_status.html#severity\">Severity</a>:</th>
</tr>
<tr>
-<td align=left valign=top>
-<SELECT NAME=\"bug_status\" MULTIPLE SIZE=7>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"bug_status\" MULTIPLE SIZE=\"7\">
@{[make_options(\@::legal_bug_status, $default{'bug_status'}, $type{'bug_status'})]}
-</SELECT>
+</SELECT><P>
</td>
-<td align=left valign=top>
-<SELECT NAME=\"resolution\" MULTIPLE SIZE=7>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"resolution\" MULTIPLE SIZE=\"7\">
@{[make_options(\@::legal_resolution, $default{'resolution'}, $type{'resolution'})]}
-</SELECT>
+</SELECT><P>
</td>
-<td align=left valign=top>
-<SELECT NAME=\"rep_platform\" MULTIPLE SIZE=7>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"rep_platform\" MULTIPLE SIZE=\"7\">
@{[make_options(\@::legal_platform, $default{'rep_platform'}, $type{'rep_platform'})]}
-</SELECT>
+</SELECT><P>
</td>
-<td align=left valign=top>
-<SELECT NAME=\"priority\" MULTIPLE SIZE=7>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"priority\" MULTIPLE SIZE=\"7\">
@{[make_options(\@::legal_priority, $default{'priority'}, $type{'priority'})]}
-</SELECT>
+</SELECT><P>
</td>
-<td align=left valign=top>
-<SELECT NAME=\"bug_severity\" MULTIPLE SIZE=7>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"bug_severity\" MULTIPLE SIZE=\"7\">
@{[make_options(\@::legal_severity, $default{'bug_severity'}, $type{'bug_severity'})]}
-</SELECT>
+</SELECT><P>
</tr>
</table>
<p>
<TABLE>
-<TR><TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned To:</a></B><TD>$who
-
+ <TR>
+ <TD ALIGN=\"RIGHT\">
+ <A HREF=\"bug_status.html#assigned_to\"><B>Assigned To:</B></A>
+ <TD>$who
<p>
-<TR><TD ALIGN=RIGHT><B>Reporter:</B><TD>$reporter
+ <TR>
+ <TD ALIGN=\"RIGHT\">
+ <A HREF=\"bug_status.html#reporter\"><B>Reporter:</B></A>
+ <TD>$reporter
</TABLE>
-<NOBR>Changed in the last <INPUT NAME=changedin SIZE=2> days.</NOBR>
+<NOBR>Changed in the last <INPUT NAME=\"changedin\" SIZE=\"2\"> days.</NOBR>
<P>
<table>
<tr>
-<TH ALIGN=LEFT>Program:</th>
-<TH ALIGN=LEFT>Version:</th>
-<TH ALIGN=LEFT>Component:</th>
+<TH ALIGN=\"LEFT\">Program:</th>
+<TH ALIGN=\"LEFT\">Version:</th>
+<TH ALIGN=\"LEFT\">Component:</th>
</tr>
<tr>
-<td align=left valign=top>
-<SELECT NAME=\"product\" MULTIPLE SIZE=5>
-@{[make_options(\@::legal_product, $default{'product'}, $type{'product'})]}
-</SELECT>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"product\" MULTIPLE SIZE=\"5\">
+@{[make_options(\@::legal_product, url_decode($default{'product'}), $type{'product'})]}
+</SELECT><P>
</td>
-<td align=left valign=top>
-<SELECT NAME=\"version\" MULTIPLE SIZE=5>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"version\" MULTIPLE SIZE=\"5\">
@{[make_options(\@::legal_versions, $default{'version'}, $type{'version'})]}
-</SELECT>
+</SELECT><P>
</td>
-<td align=left valign=top>
-<SELECT NAME=\"component\" MULTIPLE SIZE=5>
+<td align=\"left\" valign=\"top\">
+<SELECT NAME=\"component\" MULTIPLE SIZE=\"5\">
@{[make_options(\@::legal_components, $default{'component'}, $type{'component'})]}
-</SELECT>
+</SELECT><P>
</td>
</tr>
</table>
-<table border=0>
+<table border=\"0\">
<tr>
-<td align=right>Summary:</td>
-<td><input name=short_desc size=30></td>
-<td><input type=radio name=short_desc_type value=substr checked>Substring</td>
-<td><input type=radio name=short_desc_type value=regexp>Regexp</td>
+<td align=\"right\">Summary:</td>
+<td><input name=\"short_desc\" size=\"30\"></td>
+<td><input type=\"radio\" name=\"short_desc_type\" value=\"substr\" checked>Substring</td>
+<td><input type=\"radio\" name=\"short_desc_type\" value=\"regexp\">Regexp</td>
</tr>
<tr>
-<td align=right>Description:</td>
-<td><input name=long_desc size=30></td>
-<td><input type=radio name=long_desc_type value=substr checked>Substring</td>
-<td><input type=radio name=long_desc_type value=regexp>Regexp</td>
+<td align=\"right\">Description:</td>
+<td><input name=\"long_desc\" size=\"30\"></td>
+<td><input type=\"radio\" name=\"long_desc_type\" value=\"substr\" checked>Substring</td>
+<td><input type=\"radio\" name=\"long_desc_type\" value=\"regexp\">Regexp</td>
</tr>
</table>
<p>
@@ -216,27 +221,27 @@ print "
<BR>
-<INPUT TYPE=radio NAME=cmdtype VALUE=doit CHECKED> Run this query
+<INPUT TYPE=\"radio\" NAME=\"cmdtype\" VALUE=\"doit\" CHECKED> Run this query
<BR>
";
if ($namelist ne "") {
print "
-<table cellspacing=0 cellpadding=0><tr>
-<td><INPUT TYPE=radio NAME=cmdtype VALUE=editnamed> Load the remembered query:</td>
-<td rowspan=3><select name=namedcmd>$namelist</select>
+<table cellspacing=\"0\" cellpadding=\"0\"><tr>
+<td><INPUT TYPE=\"radio\" NAME=\"cmdtype\" VALUE=\"editnamed\"> Load the remembered query:</td>
+<td rowspan=\"3\"><select name=\"namedcmd\">$namelist</select>
</tr><tr>
-<td><INPUT TYPE=radio NAME=cmdtype VALUE=runnamed> Run the remembered query:</td>
+<td><INPUT TYPE=\"radio\" NAME=\"cmdtype\" VALUE=\"runnamed\"> Run the remembered query:</td>
</tr><tr>
-<td><INPUT TYPE=radio NAME=cmdtype VALUE=forgetnamed> Forget the remembered query:</td>
+<td><INPUT TYPE=\"radio\" NAME=\"cmdtype\" VALUE=\"forgetnamed\"> Forget the remembered query:</td>
</tr></table>"
}
print "
-<INPUT TYPE=radio NAME=cmdtype VALUE=asdefault> Remember this as the default query
+<INPUT TYPE=\"radio\" NAME=\"cmdtype\" VALUE=\"asdefault\"> Remember this as the default query
<BR>
-<INPUT TYPE=radio NAME=cmdtype VALUE=asnamed> Remember this query, and name it:
-<INPUT TYPE=text NAME=newqueryname>
+<INPUT TYPE=\"radio\" NAME=\"cmdtype\" VALUE=\"asnamed\"> Remember this query, and name it:
+<INPUT TYPE=\"text\" NAME=\"newqueryname\">
<BR>
<NOBR><B>Sort By:</B>
@@ -247,7 +252,7 @@ print "
</SELECT></NOBR>
<INPUT TYPE=\"submit\" VALUE=\"Submit\">
<INPUT TYPE=\"reset\" VALUE=\"Reset back to the default query\">
-<INPUT TYPE=hidden name=form_name VALUE=query>
+<INPUT TYPE=\"hidden\" name=\"form_name\" VALUE=\"query\">
<BR>Give me a <A HREF=\"help.html\">clue</A> about how to use this form.
</CENTER>
</FORM>
@@ -257,14 +262,14 @@ print "
if (defined $::COOKIE{"Bugzilla_login"}) {
if ($::COOKIE{"Bugzilla_login"} eq Param("maintainer")) {
- print "<a href=editparams.cgi>Edit Bugzilla operating parameters</a><br>\n";
- print "<a href=editowners.cgi>Edit Bugzilla component owners</a><br>\n";
+ print "<a href=\"editparams.cgi\">Edit Bugzilla operating parameters</a><br>\n";
+ print "<a href=\"editowners.cgi\">Edit Bugzilla component owners</a><br>\n";
}
- print "<a href=relogin.cgi>Log in as someone besides <b>$::COOKIE{'Bugzilla_login'}</b></a><br>\n";
+ print "<a href=\"relogin.cgi\">Log in as someone besides <b>$::COOKIE{'Bugzilla_login'}</b></a><br>\n";
}
-print "<a href=changepassword.cgi>Change your password.</a><br>\n";
-print "<a href=\"enter_bug.cgi\">Create a new bug.</a><br>\n";
-print "<a href=\"reports.cgi\">Bug reports</a><br>\n";
+print "<a href=\"changepassword.cgi\">Change your password.</a><br>\n";
+print "<a href=\"enter_bug.cgi\">Enter a new bug.</a><br>\n";
+print "<a href=\"reports.cgi\">Bug reports.</a><br>\n";
diff --git a/relogin.cgi b/relogin.cgi
index 5ef523945..0c74319a5 100755
--- a/relogin.cgi
+++ b/relogin.cgi
@@ -30,11 +30,13 @@ Set-Cookie: Bugzilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
Content-type: text/html
-<H1>Your login has been forgotten.</H1>
+";
+PutHeader("Your login has been forgotten");
+print "
The cookie that was remembering your login is now gone. The next time you
do an action that requires a login, you will be prompted for it.
<p>
-<a href=query.cgi>Back to the query page.</a>
+<A HREF=\"query.cgi\">Back to the query page.</A>
";
exit;
diff --git a/reports.cgi b/reports.cgi
index 7456c054e..12ff00c7f 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -156,11 +156,12 @@ FIN
sub most_doomed
{
my $when = localtime (time);
+ my $product = url_decode($::FORM{'product'});
print <<FIN;
<center>
<h1>
-Bug Report for $::FORM{'product'}
+Bug Report for $product
</h1>
$when<p>
FIN
@@ -179,7 +180,7 @@ from bugs,
versions projector
where bugs.assigned_to = assign.userid
and bugs.reporter = report.userid
-and bugs.product='$::FORM{'product'}'
+and bugs.product='$product'
and
(
bugs.bug_status = 'NEW' or
@@ -393,13 +394,13 @@ sub header
FIN
}
-sub show_chart
- {
- my $when = localtime (time);
+sub show_chart {
+ my $when = localtime (time);
+ my $product = url_decode($::FORM{'product'});
- if (! is_legal_product ($::FORM{'product'}))
+ if (! is_legal_product($product))
{
- &die_politely ("Unknown product: $::FORM{'product'}");
+ &die_politely ("Unknown product: $product");
}
print <<FIN;
@@ -454,7 +455,7 @@ FIN
my %settings =
(
- "title" => "Bug Charts for $::FORM{'product'}",
+ "title" => "Bug Charts for $product",
"x_label" => "Dates",
"y_label" => "Bug Count",
"legend_labels" => \@labels,
@@ -476,6 +477,7 @@ FIN
sub die_politely
{
my $msg = shift;
+ my $product = url_decode($::FORM{'product'});
print <<FIN;
<p>
@@ -484,7 +486,7 @@ sub die_politely
<td align=center>
<font color=blue>Sorry, but ...</font>
<p>
-There is no graph available for <b>$::FORM{'product'}</b><p>
+There is no graph available for <b>$product</b><p>
<font size=-1>
$msg
diff --git a/sanitycheck.cgi b/sanitycheck.cgi
index 814a1f031..102e017b7 100755
--- a/sanitycheck.cgi
+++ b/sanitycheck.cgi
@@ -18,6 +18,7 @@
# Netscape Communications Corporation. All Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
+# Andrew Anderson <andrew@redhat.com>
use diagnostics;
use strict;
@@ -42,7 +43,7 @@ sub Alert {
sub BugLink {
my ($id) = (@_);
- return "<a href='show_bug.cgi?id=$id'>$id</a>";
+ return "<a href=\"show_bug.cgi?id=$id\">$id</a>";
}
diff --git a/show_bug.cgi b/show_bug.cgi
index 98829e356..06e02da2b 100755
--- a/show_bug.cgi
+++ b/show_bug.cgi
@@ -22,16 +22,19 @@
use diagnostics;
use strict;
-print "Content-type: text/html\n";
-print "\n";
+use vars @::FORM;
require "CGI.pl";
-if (!defined $::FORM{'id'}) {
- print "<H2>Search By Bug Number</H2>\n";
- print "<FORM METHOD=GET ACTION=\"show_bug.cgi\">\n";
+confirm_login();
+
+print "Content-type: text/html\n\n";
+
+if (!defined $::FORM{'id'} || $::FORM{'id'} eq "") {
+ PutHeader("Search By Bug Number", "Search By Bug Number", "");
+ print "<FORM METHOD=\"GET\" ACTION=\"show_bug.cgi\">\n";
print "You may find a single bug by entering its bug id here: \n";
- print "<INPUT NAME=id>\n";
+ print "<INPUT NAME=\"id\">\n";
print "<INPUT TYPE=\"submit\" VALUE=\"Show Me This Bug\">\n";
print "</FORM>\n";
exit;