Closed
Bug 938596
Opened 11 years ago
Closed 11 years ago
Add hook for modifying HTTP headers
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file, 2 obsolete files)
4.97 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Bug 600692, as one example, requires the addition of extra HTTP headers. And there have been various other security specs which require it, some of which we now support natively (e.g. X-XSS-Protection, X-Frame-Options). We should have a hook in Bugzilla::CGI::header() which allows manipulation of HTTP headers.
Gerv
Updated•11 years ago
|
Severity: normal → enhancement
Assignee | ||
Comment 1•11 years ago
|
||
This patch converts the data structure in the function to a more hook-friendly hash rather than a list, and passes it to a new hook.
Is the "cgi" param necessary, or should a hook just get it from Bugzilla->cgi?
It could be that the hook doesn't always have the info it needs to make a decision whether or not to add a particular header, but I'm not sure how to give it more.
Gerv
Assignee | ||
Comment 2•11 years ago
|
||
Sorry; forgot to regenerate patch before attaching. :-|
Gerv
Attachment #832292 -
Attachment is obsolete: true
Attachment #832292 -
Flags: review?(glob)
Attachment #832293 -
Flags: review?(glob)
Comment 3•11 years ago
|
||
Comment on attachment 832293 [details] [diff] [review]
Patch v.2
The code looks good, but you must document this hook in Bugzilla/Hook.pm and add an example in extensions/Example/Extension.pm.
Attachment #832293 -
Flags: review?(glob) → review-
Assignee | ||
Comment 4•11 years ago
|
||
Thank you. Here is a patch with documentation.
Gerv
Attachment #832293 -
Attachment is obsolete: true
Attachment #832331 -
Flags: review?(LpSolit)
Comment 5•11 years ago
|
||
Comment on attachment 832331 [details] [diff] [review]
Patch v.3
r=LpSolit
Attachment #832331 -
Flags: review?(LpSolit) → review+
Updated•11 years ago
|
Updated•11 years ago
|
Flags: approval? → approval+
Comment 6•11 years ago
|
||
Gerv forgot to close this bug 3 days ago (and to paste the revision number!).
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/CGI.pm
modified Bugzilla/Hook.pm
modified extensions/Example/Extension.pm
Committed revision 8820.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•11 years ago
|
||
Oops, sorry. Thank you!
Gerv
remove tabs:
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/
modified extensions/Example/Extension.pm
Committed revision 8822.
You need to log in
before you can comment on or make changes to this bug.
Description
•