RSS

trunk : 6122

lpsolit%gmail.com
2008-07-02 22:42:16
Revision ID: cvs-1:lpsolitgmail.com-20080703034216-hrxddau7anzvj7f2
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

collapse all collapse all

added added

removed removed

680
        return unless $warn == THROW_ERROR;
680
        return unless $warn == THROW_ERROR;
681
        ThrowUserError('no_products');
681
        ThrowUserError('no_products');
682
    }
682
    }
683
    trick_taint($product_name);
683
    my $product = new Bugzilla::Product({name => $product_name});
 
 
684
 
684
    my $can_enter =
685
    my $can_enter =
685
        grep($_->name eq $product_name, @{$self->get_enterable_products});
686
      $product && grep($_->name eq $product->name, @{$self->get_enterable_products});
686
 
687
 
687
    return 1 if $can_enter;
688
    return 1 if $can_enter;
688
 
689
 
691
    # Check why access was denied. These checks are slow,
692
    # Check why access was denied. These checks are slow,
692
    # but that's fine, because they only happen if we fail.
693
    # but that's fine, because they only happen if we fail.
693
 
694
 
694
    my $product = new Bugzilla::Product({name => $product_name});
 
 
695
 
 
 
696
    # The product could not exist or you could be denied...
695
    # The product could not exist or you could be denied...
697
    if (!$product || !$product->user_has_access($self)) {
696
    if (!$product || !$product->user_has_access($self)) {
698
        ThrowUserError('entry_access_denied', {product => $product_name});
697
        ThrowUserError('entry_access_denied', {product => $product_name});

Loggerhead runs on Bazaar branches