Bug 283085 : post_bug.cgi can be used to know which products do not exist and which ones are not accessible

Patch by Frederic Buclin <LpSolit@gmail.com>   r=myk   a=myk


git-svn-id: svn://10.0.0.236/trunk@169771 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
travis%sedsystems.ca
2005-02-24 16:32:30 +00:00
parent 372d259538
commit 8a35d21d26

View File

@@ -78,12 +78,13 @@ $template->process($format->{'template'}, $vars, \$comment)
ValidateComment($comment);
# Check that the product exists and that the user
# is allowed to submit bugs in this product.
my $product = $::FORM{'product'};
my $product_id = get_product_id($product);
if (!$product_id) {
ThrowUserError("invalid_product_name",
{ product => $product });
if (!CanEnterProduct($product)) {
ThrowUserError("entry_access_denied", {product => $product});
}
my $product_id = get_product_id($product);
# Set cookies
if (exists $::FORM{'product'}) {
@@ -106,10 +107,6 @@ if (defined $::FORM{'maketemplate'}) {
umask 0;
# Some sanity checking
if (!CanEnterProduct($product)) {
ThrowUserError("entry_access_denied", {product => $product});
}
my $component_id = get_component_id($product_id, $::FORM{component});
$component_id || ThrowUserError("require_component");