Commit 1e734201 authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

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

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
parent e6f4f6c7
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment