From 3789246e0d115ebd9b0f280c8fa209a690e425fe Mon Sep 17 00:00:00 2001
From: "terry%netscape.com" <>
Date: Wed, 18 Nov 1998 13:38:43 +0000
Subject: Wasn't handling spaces in components or versions correctly.
---
process_bug.cgi | 15 +++++++++------
1 file 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 "
Changing product means changing version and component.
\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 "$prod | \n";
print "\n";
print "Version: | \n";
- print "" . Version_element($::FORM{'version'}, $prod) . " | \n";
+ print "" . Version_element($version, $prod) . " | \n";
print "
\n";
print "Component: | \n";
- print "" . Component_element($::FORM{'component'}, $prod) . " | \n";
+ print "" . Component_element($component, $prod) . " | \n";
print "
\n";
print "\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();
--
cgit v1.2.3-24-g4f1b