Skip to content

Commit 9d26b95

Browse files
committed
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/trunk@1930164 13f79535-47bb-0310-9956-ffa450edef68
1 parent e4f00c5 commit 9d26b95

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

modules/mappers/mod_userdir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static int translate_userdir(request_rec *r)
343343
r->finfo = statbuf;
344344

345345
/* For use in the get_suexec_identity phase */
346-
apr_table_setn(r->notes, "mod_userdir_user", user);
346+
ap_set_module_config(r->request_config, &userdir_module, (void *)user);
347347

348348
return OK;
349349
}
@@ -359,7 +359,7 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
359359
{
360360
ap_unix_identity_t *ugid = NULL;
361361
#if APR_HAS_USER
362-
const char *username = apr_table_get(r->notes, "mod_userdir_user");
362+
const char *username = (const char*) ap_get_module_config(r->request_config, &userdir_module);
363363

364364
if (username == NULL) {
365365
return NULL;

modules/metadata/mod_headers.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,12 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd,
455455
new->action = hdr_edit;
456456
else if (!strcasecmp(action, "edit*"))
457457
new->action = hdr_edit_all;
458-
else if (!strcasecmp(action, "note"))
458+
else if (!strcasecmp(action, "note")) {
459+
if (cmd->info == &hdr_in) {
460+
return "RequestHeader does not support the 'note' action";
461+
}
459462
new->action = hdr_note;
463+
}
460464
else
461465
return "first argument must be 'add', 'set', 'setifempty', 'append', 'merge', "
462466
"'unset', 'echo', 'note', 'edit', or 'edit*'.";

0 commit comments

Comments
 (0)