From f17a4d14ab76702e58e78f5f4630c41a7810a277 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Fri, 21 May 2004 01:12:25 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103708 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ modules/experimental/mod_auth_ldap.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 26b754d955..c2f844a4bd 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) 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/modules/experimental/mod_auth_ldap.c b/modules/experimental/mod_auth_ldap.c index 400aea8da3..d6f6dff435 100644 --- a/modules/experimental/mod_auth_ldap.c +++ b/modules/experimental/mod_auth_ldap.c @@ -223,12 +223,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 */ +#elif if (strchr("*()\\", *p) != NULL) { *q++ = '\\'; if (q >= filtbuf_end) { break; } } +#endif } *q = '\0'; -- 2.50.1