diff options
author | 2004-12-21 17:04:00 +0000 | |
---|---|---|
committer | 2004-12-21 17:04:00 +0000 | |
commit | c068e2b90f06f898217dc9919371a583517d985e (patch) | |
tree | dc5845ff868e095bfe6d7c075a5eeebba781a702 /CGI.pl | |
parent | Bug 137631 - Add a lifecycle (or workflow) diagram to the guide (diff) | |
download | bugzilla-c068e2b90f06f898217dc9919371a583517d985e.tar.gz bugzilla-c068e2b90f06f898217dc9919371a583517d985e.tar.bz2 bugzilla-c068e2b90f06f898217dc9919371a583517d985e.zip |
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.pl | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |