]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
don't use request notes for suexec
authorEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:04:29 +0000 (12:04 +0000)
committerEric Covener <covener@apache.org>
Mon, 1 Dec 2025 12:04:29 +0000 (12:04 +0000)
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/trunk@1930164 13f79535-47bb-0310-9956-ffa450edef68

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

index b8b9e92d3e7a05bef801eb6a19cf96834707378c..cae15bef87616b99bf203821cfdb5650c2d4dba0 100644 (file)
@@ -343,7 +343,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;
         }
@@ -359,7 +359,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 bd499955292a64905f04f802c598bbbcf07a9d6b..7662dfcde55d195a65cdb35f658c1856092c7d20 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_all;
-    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*'.";