Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
ab439a9a
Commit
ab439a9a
authored
Aug 24, 2007
by
timeless%mozdev.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 221827 Missing Bug ID shouldn't be handled as Invalid Bug ID
r=vladd a=mkanat
parent
938fdbf5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
Bug.pm
Bugzilla/Bug.pm
+2
-2
Constants.pm
Bugzilla/WebService/Constants.pm
+2
-2
showdependencytree.cgi
showdependencytree.cgi
+1
-1
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+5
-3
No files found.
Bugzilla/Bug.pm
View file @
ab439a9a
...
...
@@ -2797,7 +2797,7 @@ sub ValidateBugID {
my
$alias
=
$id
;
if
(
!
detaint_natural
(
$id
))
{
$id
=
bug_alias_to_id
(
$alias
);
$id
||
ThrowUserError
(
"i
nvalid_bug_id_or_alias
"
,
$id
||
ThrowUserError
(
"i
mproper_bug_id_field_value
"
,
{
'bug_id'
=>
$alias
,
'field'
=>
$field
});
}
...
...
@@ -2808,7 +2808,7 @@ sub ValidateBugID {
# First check that the bug exists
$dbh
->
selectrow_array
(
"SELECT bug_id FROM bugs WHERE bug_id = ?"
,
undef
,
$id
)
||
ThrowUserError
(
"
invalid_bug_id_non_existen
t"
,
{
'bug_id'
=>
$id
});
||
ThrowUserError
(
"
bug_id_does_not_exis
t"
,
{
'bug_id'
=>
$id
});
return
if
(
defined
$field
&&
(
$field
eq
"dependson"
||
$field
eq
"blocked"
));
...
...
Bugzilla/WebService/Constants.pm
View file @
ab439a9a
...
...
@@ -51,8 +51,8 @@ use base qw(Exporter);
# have to fix it here.
use
constant
WS_ERROR_CODE
=>
{
# Bug errors usually occupy the 100-200 range.
i
nvalid_bug_id_or_alias
=>
100
,
invalid_bug_id_non_existent
=>
101
,
i
mproper_bug_id_field_value
=>
100
,
bug_id_does_not_exist
=>
101
,
bug_access_denied
=>
102
,
invalid_field_name
=>
108
,
# These all mean "invalid alias"
...
...
showdependencytree.cgi
View file @
ab439a9a
...
...
@@ -49,7 +49,7 @@ my $dbh = Bugzilla->switch_to_shadow_db();
# Make sure the bug ID is a positive integer representing an existing
# bug that the user is authorized to access.
my
$id
=
$cgi
->
param
(
'id'
)
||
ThrowUserError
(
'i
nvalid_bug_id_or_alias
'
);
my
$id
=
$cgi
->
param
(
'id'
)
||
ThrowUserError
(
'i
mproper_bug_id_field_value
'
);
ValidateBugID
(
$id
);
my
$current_bug
=
new
Bugzilla::
Bug
(
$id
);
...
...
template/en/default/global/user-error.html.tmpl
View file @
ab439a9a
...
...
@@ -746,12 +746,14 @@
[% title = "Invalid Attachment ID" %]
The attachment id [% attach_id FILTER html %] is invalid.
[% ELSIF error == "
invalid_bug_id_non_existen
t" %]
[% ELSIF error == "
bug_id_does_not_exis
t" %]
[% title = BLOCK %]Invalid [% terms.Bug %] ID[% END %]
[% terms.Bug %] #[% bug_id FILTER html %] does not exist.
[% ELSIF error == "invalid_bug_id_or_alias" %]
[% title = BLOCK %]Invalid [% terms.Bug %] ID[% END %]
[% ELSIF error == "improper_bug_id_field_value" %]
[% title = BLOCK %]
[% IF bug_id %]Invalid [% ELSE %]Missing [% END %] [% terms.Bug %] ID
[% END %]
[% IF bug_id %]
'[% bug_id FILTER html %]' is not a valid [% terms.bug %] number
[% IF Param("usebugaliases") %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment