Hi,

Le 03/07/2014 16:38, Jon C Kidder a écrit :
I am doing some custom data validation when replicating from AD to
OpenLDAP using LSC. I have some JavaScript that performs auxiliary
searches in both the source and target directories. I've recently
noticed various search filter errors in my lsc.out file and have
discovered it is the unfortunate result of new AD data that contains
special characters which need escaped when used in a search filter. It
appears as though the ScriptableJndiServices methods that accept a
filter object do not do the required escaping. Am I expected to do
this myself before calling the methods or should I expect the methods
to do this for me and open a bug report/feature request? The examples
I can readily reproduce involve data containing parenthesis and the
search method which generates an unbalanced parenthesis error. I have
not tested the other methods or reviewed the specific source but
assume this is not restricted to the search method.

Yes, you're expected to build correct filters. This is because we can't guess which meaning you want to put in your expression.
See http://tools.lsc-project.org/issues/121 for a similar discussion.
As you can see in #121, there is a simple function to escape RDN values. If it doesn't exist for filters, maybe you can open a feature request to add this function to utils library.

Regards,
Raphaël Ouazana.
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to