From 3432af0569ddecd5f76bf4bcf29a0c45f6a19f0d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 3 Jul 2008 03:44:12 +0000 Subject: [PATCH] =?utf8?q?Bug=20365697:=20email=5Fin.pl=20is=20case-sensit?= =?utf8?q?ive=20for=20products=20due=20to=20Bugzilla::User->can=5Fenter=5F?= =?utf8?q?product=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Bucl?= =?utf8?q?in=20=20r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/User.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 5f9e2228c4..ddf8137037 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}); -- 2.47.2