[cups.bugs] [MOD] STR #3600: PATH_INFO no longer set for CGI programs

twaugh.redhat twaugh at redhat.com
Wed Jun 9 04:03:47 PDT 2010


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

The PATH_INFO variable is no longer set for CGI programs.

See http://cups.org/str.php?L2781.

How to reproduce:

mkdir /usr/share/cups/www/cgi
cat <<"EOF" > /usr/share/cups/www/cgi/test.cgi
#!/bin/bash
echo Content-Type: text/plain
echo
set
EOF
chmod +x /usr/share/cups/www/cgi/test.cgi
chcon -t bin_t /usr/share/cups/www/cgi/test.cgi
echo application/x-httpd-cgi  cgi > /etc/cups/cgi.types

Then edit /etc/cups/cupsd.conf and add this section:

<Location /cgi>
  Order allow,deny
  AuthType Default
  Require valid-user
</Location>

Then:

service cups restart

Then, in a browser, fetch:
  http://localhost:631/cgi/test.cgi?/path

You should see these lines, each somewhere in the result:

PATH_INFO='/path'

AUTH_TYPE=Basic

GATEWAY_INTERFACE=CGI/1.1

SCRIPT_FILENAME=/usr/share/cups/www/cgi/test.cgi

Link: http://www.cups.org/str.php?L3600
Version: 1.4.3





More information about the cups-devel mailing list