Loading CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] *) mod_auth_ldap: Handle the inconsistent way in which the MS LDAP library handles special characters. PR 24437 [Jess Holle] *) mod_ldap: fix a bogus error message to tell the user which file is causing a potential problem with the LDAP shared memory cache. PR 31431 [Graham Leggett] Loading modules/aaa/mod_authnz_ldap.c +33 −5 Original line number Diff line number Diff line Loading @@ -207,19 +207,47 @@ static void authn_ldap_build_filter(char *filtbuf, * LDAP filter metachars are escaped. */ 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 */ for (p = user, q=filtbuf + strlen(filtbuf); *p && q < filtbuf_end; ) { if (strchr("*()\\", *p) != NULL) { if ( q + 3 >= filtbuf_end) break; /* Don't write part of escape sequence if we can't write all of it */ *q++ = '\\'; switch ( *p++ ) { case '*': *q++ = '2'; *q++ = 'a'; break; case '(': *q++ = '2'; *q++ = '8'; break; case ')': *q++ = '2'; *q++ = '9'; break; case '\\': *q++ = '5'; *q++ = 'c'; break; } } else *q++ = *p++; } #else for (p = user, q=filtbuf + strlen(filtbuf); *p && q < filtbuf_end; *q++ = *p++) { if (strchr("*()\\", *p) != NULL) { *q++ = '\\'; if (q >= filtbuf_end) { break; } } #endif } #endif *q = '\0'; /* Loading Loading
CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] *) mod_auth_ldap: Handle the inconsistent way in which the MS LDAP library handles special characters. PR 24437 [Jess Holle] *) mod_ldap: fix a bogus error message to tell the user which file is causing a potential problem with the LDAP shared memory cache. PR 31431 [Graham Leggett] Loading
modules/aaa/mod_authnz_ldap.c +33 −5 Original line number Diff line number Diff line Loading @@ -207,19 +207,47 @@ static void authn_ldap_build_filter(char *filtbuf, * LDAP filter metachars are escaped. */ 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 */ for (p = user, q=filtbuf + strlen(filtbuf); *p && q < filtbuf_end; ) { if (strchr("*()\\", *p) != NULL) { if ( q + 3 >= filtbuf_end) break; /* Don't write part of escape sequence if we can't write all of it */ *q++ = '\\'; switch ( *p++ ) { case '*': *q++ = '2'; *q++ = 'a'; break; case '(': *q++ = '2'; *q++ = '8'; break; case ')': *q++ = '2'; *q++ = '9'; break; case '\\': *q++ = '5'; *q++ = 'c'; break; } } else *q++ = *p++; } #else for (p = user, q=filtbuf + strlen(filtbuf); *p && q < filtbuf_end; *q++ = *p++) { if (strchr("*()\\", *p) != NULL) { *q++ = '\\'; if (q >= filtbuf_end) { break; } } #endif } #endif *q = '\0'; /* Loading