20090730 how do i search on a name value that has a parens in it - plembo/onemoretech GitHub Wiki

title: How do I search on a name value that has a parens in it? link: https://onemoretech.wordpress.com/2009/07/30/how-do-i-search-on-a-name-value-that-has-a-parens-in-it/ author: lembobro description: post_id: 273 created: 2009/07/30 17:22:57 created_gmt: 2009/07/30 17:22:57 comment_status: open post_name: how-do-i-search-on-a-name-value-that-has-a-parens-in-it status: publish post_type: post

How do I search on a name value that has a parens in it?

How do I search on a name value that has a parens [”(”] in it?

You have to escape both parens characters in the LDAP search filter.

"(givenname=stephan (IT))"

why? Because the parens is what LDAP uses to determine where the filter begins and ends!

Just another reason never to let anyone store parens or other non-alphabet characters in name attributes.

(oh well…)

Copyright 2004-2019 Phil Lembo