]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1930161 from trunk:
authorEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:05:19 +0000 (12:05 +0000)
committerEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:05:19 +0000 (12:05 +0000)
don't pass args for SSI request

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1930165 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgid.c

index f21eb12f741ea72c60cc966a2551d9f4cc66cdeb..a0ef2b51699561e9fe4cfac075fe60877b32b60b 100644 (file)
@@ -239,7 +239,7 @@ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group,
     char *w;
     int idx = 0;
 
-    if (!(*args) || ap_strchr_c(args, '=')) {
+    if (!args || !(*args) || ap_strchr_c(args, '=')) {
         numwords = 0;
     }
     else {
@@ -932,7 +932,10 @@ static int cgid_server(void *data)
                 apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans);
             }
 
-            argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args);
+            /* Do not pass args in case of SSI requests */
+            argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL,
+                                                     argv0,
+                                                     cgid_req.req_type == SSI_REQ ? NULL : r->args);
 
            /* We want to close sd2 for the new CGI process too.
             * If it is left open it'll make ap_pass_brigade() block