]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 287136: Missing validations in editproducts.cgi - Patch by Frédéric Buclin <LpSol...
authorlpsolit%gmail.com <>
Wed, 4 May 2005 01:32:58 +0000 (01:32 +0000)
committerlpsolit%gmail.com <>
Wed, 4 May 2005 01:32:58 +0000 (01:32 +0000)
editproducts.cgi

index be0842912ebfca487163dd26dbfb49f7dfb87765..3a63add6a1144317d038580dde332d4de480c018 100755 (executable)
@@ -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, " .