summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-05-04 03:32:58 +0200
committerlpsolit%gmail.com <>2005-05-04 03:32:58 +0200
commit3f138672bdd7fd4aba0b5c78b3541138174bd9f0 (patch)
tree9ab38e5fb08a2a23a2fd67126e93ad186eda8992 /editproducts.cgi
parent1da5153872ffbe188daa476791f1a18384167b34 (diff)
downloadbugzilla-3f138672bdd7fd4aba0b5c78b3541138174bd9f0.tar.gz
bugzilla-3f138672bdd7fd4aba0b5c78b3541138174bd9f0.tar.xz
Bug 287136: Missing validations in editproducts.cgi - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel a=justdave
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-xeditproducts.cgi11
1 files changed, 6 insertions, 5 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index be0842912..3a63add6a 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -425,6 +425,12 @@ if ($action eq 'new') {
# Cleanups and validity checks
+ my $classification_id = 1;
+ if (Param('useclassification')) {
+ CheckClassification($classification);
+ $classification_id = get_classification_id($classification);
+ }
+
unless ($product) {
print "You must enter a name for the new product. Please press\n";
print "<b>Back</b> and try again.\n";
@@ -475,11 +481,6 @@ if ($action eq 'new') {
$votestoconfirm ||= 0;
my $defaultmilestone = $cgi->param('defaultmilestone') || "---";
- my $classification_id = 1;
- if (Param('useclassification')) {
- $classification_id = get_classification_id($classification);
- }
-
# Add the new product.
SendSQL("INSERT INTO products ( " .
"name, description, milestoneurl, disallownew, votesperuser, " .