]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
don't pass args for SSI request
authorEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:00:14 +0000 (12:00 +0000)
committerEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:00:14 +0000 (12:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1930161 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgid.c

index b27dd802d8073022d51be7f8111cf5336273016d..94ad7ee873393515711d4b319adaa539f0aa352f 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