summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-07-03 05:42:16 +0200
committerlpsolit%gmail.com <>2008-07-03 05:42:16 +0200
commita3356178011e62512acdf04ad07dca5505942644 (patch)
treea819c1b7c103f406e8334f8b5b8321a1ce117b3d /Bugzilla/User.pm
parentb446f4e4e5db1300c8ee9edea900c8e3456e8d1f (diff)
downloadbugzilla-a3356178011e62512acdf04ad07dca5505942644.tar.gz
bugzilla-a3356178011e62512acdf04ad07dca5505942644.tar.xz
Bug 365697: email_in.pl is case-sensitive for products due to Bugzilla::User->can_enter_product - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 3e609aef2..26febfcd9 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -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});