From: William A. Rowe Jr Date: Sun, 11 Sep 2005 17:34:59 +0000 (+0000) Subject: Backport 264623 from trunk X-Git-Tag: 2.1.8~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd10c4652b737a550f32d17a984cf363401095c;p=thirdparty%2Fapache%2Fhttpd.git Backport 264623 from trunk Correct mod_cgid's argv[0] so that the full path can be delved by the invoked cgi application, to conform to the behavior of mod_cgi. [Pradeep Kumar S ] Sync some CHANGES, more to come. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@280158 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 18775f952a0..7fc133509ed 100644 --- a/CHANGES +++ b/CHANGES @@ -406,9 +406,6 @@ Changes with Apache 2.1.1 sent. Log the client IP address when reporting errors in the core output filter. [Jeff Trawick] - *) Add ap_log_cerror() for logging messages associated with particular - client connections. [Jeff Trawick] - *) core: Add a warning message if the request line read fails. [Paul Querna] @@ -811,6 +808,13 @@ Changes with Apache 2.1.1 Changes with Apache 2.0.55 + *) Add ap_log_cerror() for logging messages associated with particular + client connections. [Jeff Trawick] + + *) Correct mod_cgid's argv[0] so that the full path can be delved by the + invoked cgi application, to conform to the behavior of mod_cgi. + [Pradeep Kumar S ] + *) SECURITY: CAN-2005-2088 core: If a request contains both Transfer-Encoding and Content-Length headers, remove the Content-Length, mitigating some HTTP Request diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 0437f884ca3..92812c5813b 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1311,10 +1311,7 @@ static int cgid_handler(request_rec *r) nph = !(strncmp(argv0, "nph-", 4)); - if ((argv0 = strrchr(r->filename, '/')) != NULL) - argv0++; - else - argv0 = r->filename; + argv0 = r->filename; if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,