You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/01/31 22:40:32 UTC

DO NOT REPLY [Bug 46644] New: Clean way to pass custom environment variables to suexec-ed CGI script

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


DO NOT REPLY [Bug 46644] Clean way to pass custom environment variables to suexec-ed CGI script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46644

Graham Laverty <gr...@reg.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |graham@reg.ca

-- 
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


DO NOT REPLY [Bug 46644] Clean way to pass custom environment variables to suexec-ed CGI script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46644

Graham Laverty <gr...@reg.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|PC                          |All
            Version|2.2.10                      |2.3-HEAD
         OS/Version|Linux                       |All

--- Comment #1 from Graham Laverty <gr...@reg.ca> 2011-07-11 22:00:27 UTC ---
Seconded.  This really is a feature request rather than a bug, so I'm updating
the version to reflect head.

-- 
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