Commit cd8065c2 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

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
parent 66dcd1a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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]

+0 −7
Original line number Diff line number Diff line
@@ -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
+11 −0
Original line number Diff line number Diff line
@@ -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
     */