From 1b0c4542b09e34ea570d14e65555372796b6394c Mon Sep 17 00:00:00 2001 From: Gregg Lewis Smith Date: Fri, 25 Sep 2015 06:29:05 +0000 Subject: [PATCH] core/util_script: relax alphanumeric filter of enviroment variable names on Windows to allow '(' and ')' for passing PROGRAMFILES(X86) et.al. unadulterated in 64 bit versions of Windows. PR 46751. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705217 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 5 +++++ server/util_script.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index e58b23d779..1aaa79e5e2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) core/util_script: relax alphanumeric filter of enviroment variable names + on Windows to allow '(' and ')' for passing PROGRAMFILES(X86) et.al. + unadulterated in 64 bit versions of Windows. PR 46751. + [John ] + *) mod_logio: Fix logging of %^FB (time to first byte) on the first request on an SSL connection. PR 58454. [Konstantin J. Chernov ] diff --git a/server/util_script.c b/server/util_script.c index 14991cd0ff..4ec4bb58c0 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -123,7 +123,11 @@ AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t) *whack++ = '_'; } while (*whack != '=') { +#ifdef WIN32 + if (!apr_isalnum(*whack) && *whack != '(' && *whack != ')') { +#else if (!apr_isalnum(*whack)) { +#endif *whack = '_'; } ++whack; -- 2.40.0