httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46644] New: Clean way to pass custom environment variables to suexec-ed CGI script
Date Sat, 31 Jan 2009 21:40:32 GMT
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: bugs@httpd.apache.org
        ReportedBy: matt@mattmccutchen.net


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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message