Closed Bug 345405 Opened 13 years ago Closed 13 years ago

showdependencygraph.cgi: Dependency Graphs are broken on mod_perl

Categories

(Bugzilla :: Bugzilla-General, defect, major)

2.23
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

Dependency Graphs don't work, under mod_perl. They throw an error about $ENV{PATH} being tainted, which makes sense because the ENV-clearing code in Bugzilla.pm will only run the first time the page is loaded, and mod_perl re-creates the ENV every time it loads the page.

I think the real problem is that we're doing a forked open to /usr/bin/dot:

open(DOT, "\"$webdotbase\" -Tpng $filename|");

And I thought we had eliminated forking entirely from Bugzilla.

Forking is bad, under mod_perl. You have to create a whole new httpd child, which is bad.
CC'ing people who might be interested, and also people who might know more about this file.
Flags: blocking3.0?
Flags: blocking3.0? → blocking3.0+
Target Milestone: --- → Bugzilla 3.0
Any chance to have it fixed before we release 2.23.3? I fear to see dupes as soon as people will start playing with mod_perl.
When running dependencygraph.cgi on "b.m.o on mod_perl", I get:

Error in tempfile() using data/webdot/XXXXXXXXXX.dot: Parent directory (data/webdot/) is not a directory at /opt/webtools/bugzilla-test/showdependencygraph.cgi line 115
(In reply to comment #3)
> Error in tempfile() using data/webdot/XXXXXXXXXX.dot: Parent directory
> (data/webdot/) is not a directory at
> /opt/webtools/bugzilla-test/showdependencygraph.cgi line 115

This looks like a regression from bug 351243. $webdotdir was initially an absolute path under mod_perl, but has been incorrectly changed back to a relative path.
Attached patch v1Splinter Review
Okay, that was pretty easy. This fixes it.
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #248798 - Flags: review?(LpSolit)
Comment on attachment 248798 [details] [diff] [review]
v1

Tested on b.e.c, successfully. I hope we don't introduce any other regression. :) r=LpSolit
Attachment #248798 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
Checking in showdependencygraph.cgi;
/cvsroot/mozilla/webtools/bugzilla/showdependencygraph.cgi,v  <--  showdependencygraph.cgi
new revision: 1.56; previous revision: 1.55
done
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.66; previous revision: 1.65
done
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.