summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-01-05 23:54:52 +0100
committerlpsolit%gmail.com <>2006-01-05 23:54:52 +0100
commit00984351106f67e6f6bf47e00224f6915949abf0 (patch)
tree467202786c0fb619ceca9111a85bbf777ad6e5bc
parente4b964454ad9d9c366b0d4d321269576f7edf232 (diff)
downloadbugzilla-00984351106f67e6f6bf47e00224f6915949abf0.tar.gz
bugzilla-00984351106f67e6f6bf47e00224f6915949abf0.tar.xz
Bug 320506: enter_bug.cgi crashes if the product name is written with the wrong case - Patch by Frédéric Buclin <LpSolit@gmail.com> r=myk r=bkor a=justdave
-rwxr-xr-xenter_bug.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 1692289ff..89ebbcb85 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -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();