Closed
Bug 682317
Opened 15 years ago
Closed 14 years ago
Bug.create is incorrectly documented as ignoring invalid fields; it should say it produces an error
Categories
(Bugzilla :: WebService, defect)
Bugzilla
WebService
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: gerv, Assigned: koosha.khajeh)
Details
Attachments
(1 file)
|
698 bytes,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
http://www.bugzilla.org/docs/4.0/en/html/api/Bugzilla/WebService/Bug.html#Bug_Creation_and_Modification says of Bug.create:
"This allows you to create a new bug in Bugzilla. If you specify any invalid fields, they will be ignored. If you specify any fields you are not allowed to set, they will just be set to their defaults or ignored."
However, when I try this using the BzAPI test suite, I get the following response from Bugzilla:
Aug 26 17:44:03 [ERROR] $VAR1 = {
'error' => 1,
'code' => '53',
'message' => 'see_also is not a valid parameter for the Bugzilla::Bug::create function.'
};
I have tested both with 3.4 and 4.0. We need to either fix the implementation, or update the documentation (which has said this incorrect statement since 3.2).
Gerv
Comment 1•15 years ago
|
||
That documentation was right only before we fixed the SQL injection, so yes, the documentation should be fixed on every branch where the SQL injection was fixed.
Updated•15 years ago
|
OS: Linux → All
Hardware: x86 → All
| Reporter | ||
Comment 2•15 years ago
|
||
mkanat: to be clear, you are saying that it is by design that Bug.create barfs on invalid fields, and the docs are wrong?
Gerv
Comment 3•15 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #2)
> mkanat: to be clear, you are saying that it is by design that Bug.create
> barfs on invalid fields, and the docs are wrong?
Yeah.
| Reporter | ||
Updated•15 years ago
|
Summary: Bug.create does not ignore invalid fields → Bug.create is incorrectly documented as ignoring invalid fields; it should say it produces an error
Attachment #648525 -
Flags: review?(dkl)
Attachment #648525 -
Flags: review?(LpSolit)
Comment 5•14 years ago
|
||
Comment on attachment 648525 [details] [diff] [review]
patch - v1
Review of attachment 648525 [details] [diff] [review]:
-----------------------------------------------------------------
Fix on checkin. r=dkl
::: Bugzilla/WebService/Bug.pm
@@ +2391,4 @@
> =item B<Description>
>
> This allows you to create a new bug in Bugzilla. If you specify any
> +invalid field, an error will be thrown signifying the invalidity
If you specify any invalid fields, an error will be thrown stating which field is invalid.
Attachment #648525 -
Flags: review?(dkl) → review+
Updated•14 years ago
|
Flags: approval?
Updated•14 years ago
|
Attachment #648525 -
Flags: review?(LpSolit)
Comment 6•14 years ago
|
||
Approved for all supported branches, as gerv said that all branches since 3.2 throw an error with invalid fields.
Assignee: webservice → koosha.khajeh
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval4.2+
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
Target Milestone: --- → Bugzilla 3.6
Comment 7•14 years ago
|
||
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk
modified Bugzilla/WebService/Bug.pm
Committed revision 8329.
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/4.2
modified Bugzilla/WebService/Bug.pm
Committed revision 8113.
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/4.0
modified Bugzilla/WebService/Bug.pm
Committed revision 7717.
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/3.6
modified Bugzilla/WebService/Bug.pm
Committed revision 7294.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•