From: Jeff Trawick Date: Sun, 11 Sep 2005 13:04:03 +0000 (+0000) Subject: backport from trunk: X-Git-Tag: 2.0.55~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6644fb1d5ba15cd2dcda5d079cce9eaf25273af6;p=thirdparty%2Fapache%2Fhttpd.git backport 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 ] Reviewed by: wrowe, colm, trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@280123 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 323f933bfb7..05c136ae83d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.0.55 + *) 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 ] + *) mod_include: Fix possible environment variable corruption when using nested includes. PR 12655. [Joe Orton] diff --git a/STATUS b/STATUS index 330a7b54573..6ea68bbd6c4 100644 --- a/STATUS +++ b/STATUS @@ -208,12 +208,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: +1: pquerna, nd, wrowe Votes from before the integration branch: +1: jerenkrantz - *) 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. - PR: 34542 Submitted by: Pradeep Kumar S - http://svn.apache.org/viewcvs?view=rev&rev=264623 - +1: wrowe, colm, trawick - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ please place SVN revisions from trunk here, so it is easy to identify exactly what the proposed changes are! Add all new diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index a14326f23f3..5dd50704dde 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1278,10 +1278,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,