[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4647) ldapsearch: substitution error when using file and %s



I've committed a patch to ldapsearch so that it will return
a "bad filter pattern" error when bad filter patterns are
provided.  I've also updated the man page that any
% character intended to be expressed in the filter must
be escaped (using RFC 4515 mechanism) in the pattern to
avoid a bad filter pattern error.

-- Kurt

At 01:28 PM 8/23/2006, technosophos@gmail.com wrote:
>Full_Name: M Butcher
>Version: 2.3.25
>OS: Linux (Ubuntu 6.06)
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (147.126.95.146)
>
>
>When using the -f flag and multiple %s substitution in filters, ldapsearch
>improperly attempts to expand the second %s.
>
>EXAMPLE:
>
>Contents of file 'test.txt':
>
>barbara
>
>Command line:
>
>$ ldapsearch -x -D 'cn=Manager,dc=example,dc=com' -b
>'ou=Users,dc=example,dc=com' -w secret -f test.txt '(&(uid=%s)(ou=%s))' sn
># extended LDIF
>#
># LDAPv3
># base <ou=Users,dc=example,dc=com> with scope subtree
># filter pattern: (&(uid=%s)(ou=%s))
># requesting: sn 
>#
>
>#
># filter: (&(uid=barbara)(ou=ÜJÒ· cÒ·Ð))
>#
>*** glibc detected *** corrupted double-linked list: 0x080600e8 ***
>Aborted