From: Graham Leggett Date: Fri, 21 May 2004 23:20:48 +0000 (+0000) Subject: The Microsoft LDAP SDK escapes filters for us, stop util_ldap X-Git-Tag: 2.0.50~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=143f9e086a8428a90dfcf9d97e7a4828a001f7c2;p=thirdparty%2Fapache%2Fhttpd.git The Microsoft LDAP SDK escapes filters for us, stop util_ldap from escaping filters twice when the backslash character is used. PR: 24437 Obtained from: Submitted by: Jess Holle Reviewed by: minfrin, jim, trawick, bnicholes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103730 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 74217c7377d..2d8018dc17c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.50 + *) The Microsoft LDAP SDK escapes filters for us, stop util_ldap + from escaping filters twice when the backslash character is used. + PR 24437 [Jess Holle ] + *) Overhaul handling of LDAP error conditions, so that the util_ldap_* functions leave the connections in a sane state after errors have occurred. PR 27748, 17274, 17599, 18661, 21787, 24595, 24683, 27134, diff --git a/STATUS b/STATUS index 684a8862a84..5e5f1f0f88a 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2004/05/21 22:58:30 $] +Last modified at [$Date: 2004/05/21 23:20:48 $] Release: @@ -95,12 +95,6 @@ PATCHES TO BACKPORT FROM 2.1 PR 19304 +1: minfrin, jim, trawick, bnicholes - *) The Microsoft LDAP SDK escapes filters for us, stop util_ldap - from escaping filters twice when the backslash character is used. - modules/experimental/mod_auth_ldap.c r1.25 - PR 24437 [Jess Holle ] - +1: minfrin, jim, trawick, bnicholes - *) Fix handling of IPv6 numeric strings in mod_proxy. modules/proxy/proxy_ftp.c r1.141, r1.142 modules/proxy/proxy_http.c r1.186 diff --git a/modules/experimental/mod_auth_ldap.c b/modules/experimental/mod_auth_ldap.c index 04c4b2a637c..aabd81fbc94 100644 --- a/modules/experimental/mod_auth_ldap.c +++ b/modules/experimental/mod_auth_ldap.c @@ -224,12 +224,16 @@ void mod_auth_ldap_build_filter(char *filtbuf, filtbuf_end = filtbuf + FILTER_LENGTH - 1; for (p = user, q=filtbuf + strlen(filtbuf); *p && q < filtbuf_end; *q++ = *p++) { +#if APR_HAS_MICROSOFT_LDAPSDK + /* Note: The Microsoft SDK escapes for us, so is not necessary */ +#else if (strchr("*()\\", *p) != NULL) { *q++ = '\\'; if (q >= filtbuf_end) { break; } } +#endif } *q = '\0';