Project

General

Profile

Actions

Feature #1690

closed

No way to pass arguments to CGI application

Added by Anonymous almost 16 years ago. Updated over 7 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_cgi
Target version:
-
ASK QUESTIONS IN Forums:

Description

It seems that mod_cgi doesn't care about setenv.add-environment and there's no way to pass it any arguments, it treats the whole string as binary name.

This makes impossible to run ExecWrap-like stuff via CGI. Such feature sounds critical to me.

-- farcaller

Actions #1

Updated by gstrauss almost 8 years ago

  • Description updated (diff)
  • Assignee deleted (jan)
  • Priority changed from High to Normal
Actions #2

Updated by gstrauss almost 8 years ago

  • Target version deleted (1.5.0)
Actions #3

Updated by gstrauss over 7 years ago

  • Status changed from New to Invalid

mod_cgi includes in the CGI environment the variables set by mod_setenv

As for passing arguments to CGI applications, a better mechanism to run CGI as different users is to run them as FastCGI or SCGI daemons. For example, see https://stbuehler.de/debianserver/daemontools.html

That said, if there is still interest in having this feature in lighttpd, please re-open this issue, and wordexp() could be applied. It would be ill-advised to perform word-splitting on all CGI, but would be safer to do word-splitting only on the CGI handler, if the admin has set a CGI handler, e.g.

cgi.assign = ( ".pl"  => "/usr/bin/perl" )

instead of running the script directly (with no handler), e.g.
cgi.assign = ( ".sh" => "" )

Actions

Also available in: Atom