mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_proxy: Fix ProxyPassInterpolateEnv directive.
PR: 50292 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1036602 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -6,6 +6,9 @@ Changes with Apache 2.3.9
|
||||
Fix a denial of service attack against mod_reqtimeout.
|
||||
[Stefan Fritsch]
|
||||
|
||||
*) mod_proxy: Fix ProxyPassInterpolateEnv directive. PR 50292.
|
||||
[Stefan Fritsch]
|
||||
|
||||
*) suEXEC: Add Suexec directive to disable suEXEC without renaming the
|
||||
binary (Suexec Off), or force startup failure if suEXEC is required
|
||||
but not supported (Suexec On). Change SuexecUserGroup to fail
|
||||
|
@@ -284,6 +284,7 @@
|
||||
* 20101106.1 (2.3.9-dev) Add ap_pool_cleanup_set_null() generic cleanup
|
||||
* 20101106.2 (2.3.9-dev) Add suexec_disabled_reason field to ap_unixd_config
|
||||
* 20101113.0 (2.3.9-dev) Add source address to mod_proxy.h
|
||||
* 20101113.1 (2.3.9-dev) Add ap_set_flag_slot_char()
|
||||
*/
|
||||
|
||||
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
||||
@@ -291,7 +292,7 @@
|
||||
#ifndef MODULE_MAGIC_NUMBER_MAJOR
|
||||
#define MODULE_MAGIC_NUMBER_MAJOR 20101113
|
||||
#endif
|
||||
#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
|
||||
#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
|
||||
|
||||
/**
|
||||
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
|
||||
|
@@ -640,7 +640,7 @@ AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd,
|
||||
void *struct_ptr,
|
||||
const char *arg);
|
||||
/**
|
||||
* Generic command handling function for flags
|
||||
* Generic command handling function for flags stored in an int
|
||||
* @param cmd The command parameters for this directive
|
||||
* @param struct_ptr pointer into a given type
|
||||
* @param arg The argument to the directive (either 1 or 0)
|
||||
@@ -649,6 +649,16 @@ AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd,
|
||||
AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd,
|
||||
void *struct_ptr,
|
||||
int arg);
|
||||
/**
|
||||
* Generic command handling function for flags stored in a char
|
||||
* @param cmd The command parameters for this directive
|
||||
* @param struct_ptr pointer into a given type
|
||||
* @param arg The argument to the directive (either 1 or 0)
|
||||
* @return An error string or NULL on success
|
||||
*/
|
||||
AP_DECLARE_NONSTD(const char *) ap_set_flag_slot_char(cmd_parms *cmd,
|
||||
void *struct_ptr,
|
||||
int arg);
|
||||
/**
|
||||
* Generic command handling function for files
|
||||
* @param cmd The command parameters for this directive
|
||||
|
@@ -2170,7 +2170,7 @@ static const command_rec proxy_cmds[] =
|
||||
"a scheme, partial URL or '*' and a proxy server"),
|
||||
AP_INIT_TAKE2("ProxyRemoteMatch", add_proxy_regex, NULL, RSRC_CONF,
|
||||
"a regex pattern and a proxy server"),
|
||||
AP_INIT_FLAG("ProxyPassInterpolateEnv", ap_set_flag_slot,
|
||||
AP_INIT_FLAG("ProxyPassInterpolateEnv", ap_set_flag_slot_char,
|
||||
(void*)APR_OFFSETOF(proxy_dir_conf, interpolate_env),
|
||||
RSRC_CONF|ACCESS_CONF, "Interpolate Env Vars in reverse Proxy") ,
|
||||
AP_INIT_RAW_ARGS("ProxyPass", add_pass_noregex, NULL, RSRC_CONF|ACCESS_CONF,
|
||||
|
@@ -1396,6 +1396,18 @@ AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AP_DECLARE_NONSTD(const char *) ap_set_flag_slot_char(cmd_parms *cmd,
|
||||
void *struct_ptr_v, int arg)
|
||||
{
|
||||
int offset = (int)(long)cmd->info;
|
||||
char *struct_ptr = (char *)struct_ptr_v;
|
||||
|
||||
*(struct_ptr + offset) = arg ? 1 : 0;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, void *struct_ptr,
|
||||
const char *arg)
|
||||
{
|
||||
|
Reference in New Issue
Block a user