You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by "Dmitry A.Steklenev" <gl...@cholod.ru> on 2000/12/06 08:07:18 UTC
os-os2/6936: Invalid PATH_INFO and SCRIPT_NAME in cgi script environment
>Number: 6936
>Category: os-os2
>Synopsis: Invalid PATH_INFO and SCRIPT_NAME in cgi script environment
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue Dec 05 23:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: glass@cholod.ru
>Release: 1.3.14 and other?
>Organization:
apache
>Environment:
os/2 warp 4.0, gcc 2.8.1 with EMX 0.9d fix 3
>Description:
The ap_os_case_canonical_filename() in os2_utils.c remove trailing
slash from filename. And get_path_info(request_rec *r) place
path without trailing slash to r->path_info. This is incompatible for
other operating systems and i have many problems with cvsweb.cgi.
Also ap_add_cgi_vars() use r->path_info to build script name from
r->uri. Without trailing slash in path_info it create invalid
script_name :(
>How-To-Repeat:
http://www/cgi-bin/printenv/my_test_cgi/
results:
REQUEST_URI="/cgi-bin/printenv/my_test_cgi/"
PATH_INFO="/my_test_cgi"
SCRIPT_NAME="/cgi-bin/printenv/my_test_cgi"
>Fix:
May be remove all convertations from os2 version
ap_os_case_canonical_filename() excepting "\" to "/"? Like this:
PI_EXPORT(char *)ap_os_case_canonical_filename(pool *pPool, const char *szFile)
{
char buf[HUGE_STRING_LEN];
int rc, len;
char *pos;
strcpy(buf, szFile);
/* Switch backslashes to forward */
for (pos=buf; *pos; pos++)
if (*pos == '\\')
*pos = '/';
return ap_pstrdup(pPool, buf);
}
>Release-Note:
>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 make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database 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! ]