]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1930164 from trunk:
authorEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:06:46 +0000 (12:06 +0000)
committerEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:06:46 +0000 (12:06 +0000)
don't use request notes for suexec

also, stop accepting the obscure "note" option in
RequestHeader, it is only documented/described as being
meant for Header (output filter).

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

modules/mappers/mod_userdir.c
modules/metadata/mod_headers.c

index 1ec0e9010d259dca56681e2a97f963b192c87655..0a34fd35b179fc3400fae72b813199dd8155fec3 100644 (file)
@@ -334,7 +334,7 @@ static int translate_userdir(request_rec *r)
                 r->finfo = statbuf;
 
             /* For use in the get_suexec_identity phase */
-            apr_table_setn(r->notes, "mod_userdir_user", user);
+            ap_set_module_config(r->request_config, &userdir_module, (void *)user);
 
             return OK;
         }
@@ -348,7 +348,7 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
 {
     ap_unix_identity_t *ugid = NULL;
 #if APR_HAS_USER
-    const char *username = apr_table_get(r->notes, "mod_userdir_user");
+    const char *username = (const char*) ap_get_module_config(r->request_config, &userdir_module);
 
     if (username == NULL) {
         return NULL;
index f08382d61f0fc8f5c000d5cf96b1c933a487e8b6..f514b4bc6a0ec9981ca0082ade5ff3b060fbbf5c 100644 (file)
@@ -455,8 +455,12 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd,
         new->action = hdr_edit;
     else if (!strcasecmp(action, "edit*"))
         new->action = hdr_edit_r;
-    else if (!strcasecmp(action, "note"))
+    else if (!strcasecmp(action, "note")) {
+        if (cmd->info == &hdr_in) {
+            return "RequestHeader does not support the 'note' action";
+        }
         new->action = hdr_note;
+    }
     else
         return "first argument must be 'add', 'set', 'setifempty', 'append', 'merge', "
                "'unset', 'echo', 'note', 'edit', or 'edit*'.";