summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%netscape.com <>1998-11-18 14:38:43 +0100
committerterry%netscape.com <>1998-11-18 14:38:43 +0100
commit3789246e0d115ebd9b0f280c8fa209a690e425fe (patch)
tree3b11c288fa85137c9c28d701b59601ca94c2d298
parent0ca30382be83fccfc4e352096c87c56bbf8a673c (diff)
downloadbugzilla-3789246e0d115ebd9b0f280c8fa209a690e425fe.tar.gz
bugzilla-3789246e0d115ebd9b0f280c8fa209a690e425fe.tar.xz
Wasn't handling spaces in components or versions correctly.
-rwxr-xr-xprocess_bug.cgi15
1 files changed, 9 insertions, 6 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 785ba1b29..84750e0e6 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -38,10 +38,13 @@ GetVersionTable();
if ($::FORM{'product'} ne $::dontchange) {
my $prod = url_decode($::FORM{'product'});
- my $vok = lsearch($::versions{$prod}, $::FORM{'version'}) >= 0;
- my $cok = lsearch($::components{$prod}, $::FORM{'component'}) >= 0;
+ my $version = url_decode($::FORM{'version'});
+ my $component = url_decode($::FORM{'component'});
+ my $vok = lsearch($::versions{$prod}, $version) >= 0;
+ my $cok = lsearch($::components{$prod}, $component) >= 0;
if (!$vok || !$cok) {
print "<H1>Changing product means changing version and component.</H1>\n";
+
print "You have chosen a new product, and now the version and/or\n";
print "component fields are not correct. (Or, possibly, the bug did\n";
print "not have a valid component or version field in the first place.)\n";
@@ -53,10 +56,10 @@ if ($::FORM{'product'} ne $::dontchange) {
print "<td>$prod</td>\n";
print "</tr><tr>\n";
print "<td align=\"right\"><b>Version:</b></td>\n";
- print "<td>" . Version_element($::FORM{'version'}, $prod) . "</td>\n";
+ print "<td>" . Version_element($version, $prod) . "</td>\n";
print "</tr><tr>\n";
print "<td align=\"right\"><b>Component:</b></td>\n";
- print "<td>" . Component_element($::FORM{'component'}, $prod) . "</td>\n";
+ print "<td>" . Component_element($component, $prod) . "</td>\n";
print "</tr>\n";
print "</table>\n";
foreach my $i (keys %::FORM) {
@@ -159,8 +162,8 @@ SWITCH: for ($::FORM{'knob'}) {
}
ChangeStatus('NEW');
SendSQL("select initialowner from components where program=" .
- SqlQuote($::FORM{'product'}) . " and value=" .
- SqlQuote($::FORM{'component'}));
+ SqlQuote(url_decode($::FORM{'product'})) . " and value=" .
+ SqlQuote(url_decode($::FORM{'component'})));
my $newname = FetchOneColumn();
my $newid = DBNameToIdAndCheck($newname, 1);
DoComma();