summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorjake%bugzilla.org <>2004-12-21 18:04:00 +0100
committerjake%bugzilla.org <>2004-12-21 18:04:00 +0100
commitc068e2b90f06f898217dc9919371a583517d985e (patch)
treedc5845ff868e095bfe6d7c075a5eeebba781a702 /CGI.pl
parentf21cae35b182db1feccab05c3c2ad57357342dbe (diff)
downloadbugzilla-c068e2b90f06f898217dc9919371a583517d985e.tar.gz
bugzilla-c068e2b90f06f898217dc9919371a583517d985e.tar.xz
Bug 264601 - Bugzilla will now tell a user which field contained an "invalid bug number or alias."
Patch by Frédéric Buclin <LpSolit@netscape.net> r=myk, a=justdave
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/CGI.pl b/CGI.pl
index 456022808..0d03562fe 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -148,7 +148,7 @@ sub ValidateBugID {
# database, and that the user is authorized to access that bug.
# We detaint the number here, too
- my ($id, $skip_authorization) = @_;
+ my ($id, $field) = @_;
# Get rid of white-space around the ID.
$id = trim($id);
@@ -157,7 +157,9 @@ sub ValidateBugID {
my $alias = $id;
if (!detaint_natural($id)) {
$id = BugAliasToID($alias);
- $id || ThrowUserError("invalid_bug_id_or_alias", {'bug_id' => $alias});
+ $id || ThrowUserError("invalid_bug_id_or_alias",
+ {'bug_id' => $alias,
+ 'field' => $field });
}
# Modify the calling code's original variable to contain the trimmed,
@@ -170,7 +172,7 @@ sub ValidateBugID {
FetchOneColumn()
|| ThrowUserError("invalid_bug_id_non_existent", {'bug_id' => $id});
- return if $skip_authorization;
+ return if ($field eq "dependson" || $field eq "blocked");
return if Bugzilla->user->can_see_bug($id);