]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 320506: enter_bug.cgi crashes if the product name is written with the wrong case...
authorlpsolit%gmail.com <>
Thu, 5 Jan 2006 22:54:52 +0000 (22:54 +0000)
committerlpsolit%gmail.com <>
Thu, 5 Jan 2006 22:54:52 +0000 (22:54 +0000)
enter_bug.cgi

index 1692289ffce6cd144736ed6bd5a0ef9049c5684d..89ebbcb8515ec12caa97a84d4ecc285181e46f40 100755 (executable)
@@ -41,6 +41,7 @@ use Bugzilla;
 use Bugzilla::Constants;
 use Bugzilla::Bug;
 use Bugzilla::User;
+use Bugzilla::Product;
 require "globals.pl";
 
 use vars qw(
@@ -327,6 +328,9 @@ if ($cloned_bug_id) {
 
 # We need to check and make sure
 # that the user has permission to enter a bug against this product.
+my $prod_obj = new Bugzilla::Product({name => $product});
+# Update the product name to get the correct case.
+$product = $prod_obj->name if defined $prod_obj;
 Bugzilla->user->can_enter_product($product, 1);
 
 GetVersionTable();