Closed
Bug 1232297
Opened 10 years ago
Closed 9 years ago
Bugzilla should require taint mode at runtime
Categories
(Bugzilla :: Bugzilla-General, defect, P1)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: dylan, Assigned: dylan)
References
Details
Attachments
(1 file, 2 obsolete files)
1.37 KB,
patch
|
LpSolit
:
review-
|
Details | Diff | Splinter Review |
We need to require taint mode (at runtime) until such time as we don't generate SQL by hand. This is as simple as checking ${^TAINT}.
I'm setting this as a blocker for PSGI support because PSGI makes it very easy to run bugzilla without taint mode.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8698009 -
Flags: review?(dkl)
![]() |
||
Comment 2•10 years ago
|
||
I don't think we need to *require* taint mode. If one wants to run his Bugzilla installation with taint mode disabled, that's his own responsibility. Remember you wanted to do it for BMO.
Assignee | ||
Comment 3•10 years ago
|
||
What about if we require this unless a param is specifically set in data/params? I would like it to be impossible to accidentally turn off taint mode. Currently it is difficult because of the apache config and/or the shebang lines, but this goes away under PSGI.
![]() |
||
Comment 4•10 years ago
|
||
(In reply to Dylan William Hardison [:dylan] from comment #3)
> What about if we require this unless a param is specifically set in
> data/params?
A parameter is overkill, especially because you would have to restart your web server anyway to enable/disable the taint mode. An environment variable would be preferable IMO, e.g. BZ_NO_TAINT_OK = 1. When set to a true value, no check against ${^TAINT} would be done. If false or missing, then the taint mode would be required.
Target Milestone: --- → Bugzilla 6.0
Assignee | ||
Updated•10 years ago
|
Attachment #8698009 -
Flags: review?(dkl)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8698009 -
Attachment is obsolete: true
Attachment #8702423 -
Flags: review?(LpSolit)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8702423 -
Attachment is obsolete: true
Attachment #8702423 -
Flags: review?(LpSolit)
Attachment #8702433 -
Flags: review?(LpSolit)
![]() |
||
Comment 7•10 years ago
|
||
Comment on attachment 8702433 [details] [diff] [review]
1232297_3.patch
>+++ b/Bugzilla.pm
>+ ThrowCodeError('taint_mode_required') if i_am_cgi() && !${^TAINT} && !$ENV{BZ_DISABLE_TAINT_MODE};
When using plackup, this code is called by app.psgi itself, not by CGI scripts, and so i_am_cgi() is always false.
Also, this line is too long, see bug 988736.
>+++ b/template/en/default/global/code-error.html.tmpl
>+ [% ELSIF error == "taint_mode_required" %]
>+ [% terms.Bugzilla %] requires taint mode to be enabled. If you really want to run [% terms.Bugzilla %]
>+ without taint mode, please set the <code>$BZ_DISABLE_TAINT_MODE</code> environmental variable to "1".
s/environmental/environment/ per http://perldoc.perl.org/Env.html. Also, remove $ in front of the variable name; it's confusing IMO.
These lines are too long. They should not exceed 80 characters, see above.
Attachment #8702433 -
Flags: review?(LpSolit) → review-
Assignee | ||
Comment 8•9 years ago
|
||
Fixing this would preclude running bugzilla under plack, as plack has zero support for running under taint mode.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
![]() |
||
Updated•9 years ago
|
Target Milestone: Bugzilla 6.0 → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•