How to escape "/" in a distinguished name in a LDAP URI?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to escape "/" in a distinguished name in a LDAP URI?

Weijun Wang
If the dn is "CN=esca/ped", what does a LDAP URI containing it look like?

How many levels of escaping do I need? Just percent? Or I need to add backslash first?

Thanks
Max

Reply | Threaded
Open this post in threaded view
|

Re: How to escape "/" in a distinguished name in a LDAP URI?

Rob McKenna
I can never recall off the top of my head but I wrote a test that might be helpful:

http://t4.ie.oracle.com/home/robm/files/webrev/8177806/webrev.02/raw_files/new/test/javax/naming/Name/LdapEscapeTest.java

This didn't require pushing in the end but I should hang onto it as its a simple way of checking how we end up parsing ldap urls.

    -Rob

On 14/11/17 00:07, Weijun Wang wrote:
> If the dn is "CN=esca/ped", what does a LDAP URI containing it look like?
>
> How many levels of escaping do I need? Just percent? Or I need to add backslash first?
>
> Thanks
> Max
>