diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2010-03-25 11:51:26 -0600 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2010-03-25 12:26:30 -0600 |
| commit | c1d2e7461ac41f39f5f27f3d9dcd6084bb4435a5 (patch) | |
| tree | 0f4a7bb06d66e241bead206087bc3d04256eebb0 /ldap/servers/plugins/syntaxes | |
| parent | 742032c11f0dabbdc80ba204801c27c4cbe305a4 (diff) | |
| download | ds-c1d2e7461ac41f39f5f27f3d9dcd6084bb4435a5.tar.gz ds-c1d2e7461ac41f39f5f27f3d9dcd6084bb4435a5.tar.xz ds-c1d2e7461ac41f39f5f27f3d9dcd6084bb4435a5.zip | |
Bug 576074 - search filters with parentheses fail
https://bugzilla.redhat.com/show_bug.cgi?id=576074
Resolves: bug 576074
Bug Description: search filters with parentheses fail
Reviewed by: nhosoi (Thanks!)
Branch: HEAD
Fix Description: PCRE requires '(' and ')' to be escaped to match a literal
parenthesis. Otherwise, it thinks the parenthesis is used for grouping.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Diffstat (limited to 'ldap/servers/plugins/syntaxes')
| -rw-r--r-- | ldap/servers/plugins/syntaxes/string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ldap/servers/plugins/syntaxes/string.c b/ldap/servers/plugins/syntaxes/string.c index ad607dc4..dd44a808 100644 --- a/ldap/servers/plugins/syntaxes/string.c +++ b/ldap/servers/plugins/syntaxes/string.c @@ -262,7 +262,7 @@ string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char *final, if ( initial != NULL ) { value_normalize( initial, syntax, 1 /* trim leading blanks */ ); *p++ = '^'; - filter_strcpy_special( p, initial ); + filter_strcpy_special_ext( p, initial, FILTER_STRCPY_ESCAPE_PARENS ); p = strchr( p, '\0' ); } if ( any != NULL ) { @@ -271,7 +271,7 @@ string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char *final, /* ".*" + value */ *p++ = '.'; *p++ = '*'; - filter_strcpy_special( p, any[i] ); + filter_strcpy_special_ext( p, any[i], FILTER_STRCPY_ESCAPE_PARENS ); p = strchr( p, '\0' ); } } @@ -280,7 +280,7 @@ string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char *final, /* ".*" + value */ *p++ = '.'; *p++ = '*'; - filter_strcpy_special( p, final ); + filter_strcpy_special_ext( p, final, FILTER_STRCPY_ESCAPE_PARENS ); strcat( p, "$" ); } |
