mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
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
This commit is contained in:
parent
3243c8f515
commit
5cbf37aeda
@ -78,12 +78,13 @@ $template->process($format->{'template'}, $vars, \$comment)
|
|||||||
|
|
||||||
ValidateComment($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 = $::FORM{'product'};
|
||||||
my $product_id = get_product_id($product);
|
if (!CanEnterProduct($product)) {
|
||||||
if (!$product_id) {
|
ThrowUserError("entry_access_denied", {product => $product});
|
||||||
ThrowUserError("invalid_product_name",
|
|
||||||
{ product => $product });
|
|
||||||
}
|
}
|
||||||
|
my $product_id = get_product_id($product);
|
||||||
|
|
||||||
# Set cookies
|
# Set cookies
|
||||||
if (exists $::FORM{'product'}) {
|
if (exists $::FORM{'product'}) {
|
||||||
@ -106,10 +107,6 @@ if (defined $::FORM{'maketemplate'}) {
|
|||||||
umask 0;
|
umask 0;
|
||||||
|
|
||||||
# Some sanity checking
|
# Some sanity checking
|
||||||
if (!CanEnterProduct($product)) {
|
|
||||||
ThrowUserError("entry_access_denied", {product => $product});
|
|
||||||
}
|
|
||||||
|
|
||||||
my $component_id = get_component_id($product_id, $::FORM{component});
|
my $component_id = get_component_id($product_id, $::FORM{component});
|
||||||
$component_id || ThrowUserError("require_component");
|
$component_id || ThrowUserError("require_component");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user