Closed
Bug 399461
Opened 18 years ago
Closed 18 years ago
Bugzilla::Hook::process() doesn't flush Bugzilla->hook_args() after executing an extension
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: LpSolit, Assigned: LpSolit)
Details
Attachments
(1 file)
|
621 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
Assume you have two extensions in the same CGI. They would both be executed, but Bugzilla->hook_args() defined by the first extension is not flushed before the 2nd extension is called, and so the 2nd extension may access data unrelated to it (if no argument is passed when calling it, so that Bugzilla->hook_args is left unaltered). Not only there could be some security implications, but the 2nd extension may work incorrectly as it's getting unexpected data. So we should flush Bugzilla->hook_args in Bugzilla::Hook::process() before calling the next extension.
Attachment #284487 -
Flags: review?(mkanat)
| Assignee | ||
Updated•18 years ago
|
Assignee: general → LpSolit
Comment 1•18 years ago
|
||
Comment on attachment 284487 [details] [diff] [review]
patch, v1
Yeah, this looks right.
I wonder if hook_args should be called outside the foreach loop, really. I guess not--scalar values should be reset between calls to different plugins.
Attachment #284487 -
Flags: review?(mkanat) → review+
Updated•18 years ago
|
Status: NEW → ASSIGNED
Flags: approval3.0+
Flags: approval+
| Assignee | ||
Comment 2•18 years ago
|
||
tip:
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.11; previous revision: 1.10
done
3.0.2:
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.7.2.1; previous revision: 1.7
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•