httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1795635 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number modules/metadata/mod_env.c
Date Fri, 19 May 2017 20:51:51 GMT
Author: jailletc36
Date: Fri May 19 20:51:51 2017
New Revision: 1795635

URL: http://svn.apache.org/viewvc?rev=1795635&view=rev
Log:
When processing a 'SetEnv' directive, warn if the environment variable name includes a '='.
It is likely a configuration error.   PR 60249

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/log-message-tags/next-number
    httpd/httpd/trunk/modules/metadata/mod_env.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1795635&r1=1795634&r2=1795635&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri May 19 20:51:51 2017
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) 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]
 

Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1795635&r1=1795634&r2=1795635&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Fri May 19 20:51:51 2017
@@ -1 +1 @@
-10032
+10033

Modified: httpd/httpd/trunk/modules/metadata/mod_env.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_env.c?rev=1795635&r1=1795634&r2=1795635&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_env.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_env.c Fri May 19 20:51:51 2017
@@ -113,6 +113,17 @@ static const char *add_env_module_vars_s
 {
     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
      */



Mime
View raw message