You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Mohit Aron <ar...@cs.rice.edu> on 1998/12/24 03:59:11 UTC

general/3581: CGI scripts never get invoked if the URL contains %2f instead of /

>Number:         3581
>Category:       general
>Synopsis:       CGI scripts never get invoked if the URL contains %2f instead of /
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Dec 23 20:10:00 PST 1998
>Last-Modified:
>Originator:     aron@cs.rice.edu
>Organization:
apache
>Release:        1.3.3
>Environment:
SunOS mrsclaus.cs.rice.edu 5.6 Generic_105181-03 sun4m sparc SUNW,SPARCstation-10
Compiler gcc-2.8.0.
>Description:
I believe that any path following a CGI script in the URL is passed as arguments
(environment variable PATH_INFO) to the CGI script. However, with Apache 1.3.3
CGI scripts never get invoked if the URL contains %2f instead of /. The
example below would make it clear.
>How-To-Repeat:
The default distribution comes with a printenv cgi-script in cgi-bin directory.
Try the following invocations:
	http://server/cgi-bin/printenv/a/a
	http://server/cgi-bin/printenv/a%2fa
On the second URL, the server would complain that it didn't find the file - the
CGI script never gets invoked
>Fix:
Haven't looked at the code - I guess the place where CGI parsing is done needs
to be fixed.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]