From 3f138672bdd7fd4aba0b5c78b3541138174bd9f0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 4 May 2005 01:32:58 +0000 Subject: Bug 287136: Missing validations in editproducts.cgi - Patch by Frédéric Buclin r=joel a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editproducts.cgi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'editproducts.cgi') 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 "Back 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, " . -- cgit v1.2.3-24-g4f1b