https://issues.apache.org/bugzilla/show_bug.cgi?id=46644
Summary: Clean way to pass custom environment variables to
suexec-ed CGI script
Product: Apache httpd-2
Version: 2.2.10
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: mod_suexec
AssignedTo: [email protected]
ReportedBy: [email protected]
It's sometimes desirable to have a suexec-ed CGI script read a custom
environment variable to find out what it is supposed to do. I described my
scenario, where a CGI script needed to know which of three RewriteRules called
it, at:
http://marc.info/?l=apache-httpd-users&m=123166031312092&w=2
The problem is that, for good security reasons, suexec strips out all
environment variables except for a whitelist consisting of standard ones set by
the Web server. I would like a safe, supported convention for passing custom
environment variables. (I can stuff them in the HTTP_ namespace, but that's a
hack.) Furthermore, internal redirects should not break the convention.
The obvious solution is to allocate a new namespace. I previously suggested
CGI_, but now I'm thinking SUEXEC_ may be better. REDIRECT_SUEXEC_ vars could
either be passed through or renamed to SUEXEC_REDIRECT_ . An interesting
additional possibility would be to prepend SUEXEC_ to unsafe variables instead
of dropping them; this way, the entire environment would be available to
suexec-ed CGI scripts (but not in a form that could subvert them) without any
extra work on the Apache side.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]