Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
go ahead... be a heretic
 
PerlMonks  

Re: LDAP. Parantheses present in the filter cn value

by shmem (Canon)
on Dec 05, 2013 at 15:35 UTC ( #1065775=note: print w/ replies, xml ) Need Help??


in reply to LDAP. Parantheses present in the filter cn value

Escaping them with a backslash (within double quotes the backslash is meaningful and must be escaped, so two of them) should work:

$ldap->search( base => $ldapbase, scope => "sub", filter => "(cn= John Wyner \\(DRAFT\\))" );
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'


Comment on Re: LDAP. Parantheses present in the filter cn value
Download Code
Re^2: LDAP. Parantheses present in the filter cn value
by atcroft (Monsignor) on Dec 05, 2013 at 15:48 UTC

    If shmem's suggestion does not work for you, then you may want to look at (untested) replacing the parens in question with their hex representations per RFC 4514, so the string becomes "(cn = John Wyner \64DRAFT\65)".

    Hope that helps.

Re^2: LDAP. Parantheses present in the filter cn value
by srini.here (Initiate) on Dec 09, 2013 at 12:58 UTC

    thanks a ton. that did help. :) :) :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2014-04-21 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls