]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 365697: email_in.pl is case-sensitive for products due to Bugzilla::User->can_ent...
authorlpsolit%gmail.com <>
Thu, 3 Jul 2008 03:42:16 +0000 (03:42 +0000)
committerlpsolit%gmail.com <>
Thu, 3 Jul 2008 03:42:16 +0000 (03:42 +0000)
Bugzilla/User.pm

index 3e609aef2aa58ced55b8f0e9d1ab7551c76d55d7..26febfcd944b3a792280cfbd23006d2b2c099fd7 100644 (file)
@@ -680,9 +680,10 @@ sub can_enter_product {
         return unless $warn == THROW_ERROR;
         ThrowUserError('no_products');
     }
-    trick_taint($product_name);
+    my $product = new Bugzilla::Product({name => $product_name});
+
     my $can_enter =
-        grep($_->name eq $product_name, @{$self->get_enterable_products});
+      $product && grep($_->name eq $product->name, @{$self->get_enterable_products});
 
     return 1 if $can_enter;
 
@@ -691,8 +692,6 @@ sub can_enter_product {
     # Check why access was denied. These checks are slow,
     # but that's fine, because they only happen if we fail.
 
-    my $product = new Bugzilla::Product({name => $product_name});
-
     # The product could not exist or you could be denied...
     if (!$product || !$product->user_has_access($self)) {
         ThrowUserError('entry_access_denied', {product => $product_name});