"new Bugzilla::Bug" should return undef instead of an object with {error} set

NEW
Unassigned

Status

()

Bugzilla
Creating/Changing Bugs
P2
enhancement
8 years ago
4 years ago

People

(Reporter: Max Kanat-Alexander, Unassigned)

Tracking

Dependency tree / graph

Details

(Reporter)

Description

8 years ago
We should make Bugzilla::Bug behave consistently with all the other Bugzilla::Object implementations, and return undef instead of an object with {error} set. Then we can implement some *other* method of implementing the things that we currently implement using {error} (like just calling can_see_bug and all that directly).

Comment 1

8 years ago
This would also fix bug 348397 on tip.
Blocks: 348397

Comment 2

5 years ago
If you pass an alias which doesn't exist, new() uses this alias as bug ID. You could then have a string where a scalar is expected, which could lead to XSS if checks aren't done correctly (but probably no SQL injection as the alias is probably tainted).
Assignee: create-and-change → LpSolit
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Bugzilla 5.0

Updated

4 years ago
Assignee: LpSolit → create-and-change
Target Milestone: Bugzilla 5.0 → ---

Updated

4 years ago
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.