From: Jim Jagielski Date: Tue, 30 May 2017 12:25:13 +0000 (+0000) Subject: Merge r1795635 from trunk: X-Git-Tag: 2.4.26~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f43ac4facd0be6956bd3e131a77b97adb612f513;p=apache Merge r1795635 from trunk: When processing a 'SetEnv' directive, warn if the environment variable name includes a '='. It is likely a configuration error. PR 60249 Submitted by: jailletc36 Reviewed by: jailletc36, covener, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1796853 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7a07d99277..ddf722da2a 100644 --- a/CHANGES +++ b/CHANGES @@ -18,6 +18,10 @@ Changes with Apache 2.4.26 *) core: EBCDIC fixes for interim responses with additional headers. [Eric Covener] + *) mod_env: when processing a 'SetEnv' directive, warn if the environment + variable name includes a '='. It is likely a configuration error. + PR 60249 [Christophe Jaillet] + *) Evaluate nested If/ElseIf/Else configuration blocks. [Luca Toscano, Jacob Champion] diff --git a/STATUS b/STATUS index a52af1f092..28add1d0f4 100644 --- a/STATUS +++ b/STATUS @@ -120,13 +120,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) mod_env: When processing a 'SetEnv' directive, warn if the environment - variable name includes a '='. It is likely a configuration error. - PR 60249. - trunk patch: http://svn.apache.org/r1795635 - 2.4.x patch: svn merge -c 1795635 ^/httpd/httpd/trunk . (modulo CHANGES) - +1: jailletc36, covener, ylavic - *) mod_ssl: Consistently pass the expected bio_filter_in_ctx_t to ssl_io_filter_error(). [Yann Ylavic] trunk patch: http://svn.apache.org/r1796343 diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c index e3e1d4e061..081ee549f3 100644 --- a/modules/metadata/mod_env.c +++ b/modules/metadata/mod_env.c @@ -113,6 +113,17 @@ static const char *add_env_module_vars_set(cmd_parms *cmd, void *sconf_, { env_dir_config_rec *sconf = sconf_; + if (ap_strchr_c(name, '=')) { + char *env, *plast; + + env = apr_strtok(apr_pstrdup(cmd->temp_pool, name), "=", &plast); + + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(10032) + "Spurious usage of '=' in an environment variable name. " + "'%s %s %s' expected instead?", cmd->cmd->name, env, plast); + + } + /* name is mandatory, value is optional. no value means * set the variable to an empty string */