ldapsdk icon indicating copy to clipboard operation
ldapsdk copied to clipboard

LDAP_MATCHING_RULE_IN_CHAIN extended match operator

Open Natipapi opened this issue 5 years ago • 1 comments

I recently changed my filters from textual, prone to special characters filters, i.e. (memberOf:1.2.840.113556.1.4.1941:=" + dn + ") to: Filter.createEqualityFilter("memberOf:1.2.840.113556.1.4.1941:", dn1) But the control is ignored on the filter. I couldn't find a proper "pre defined" control on LdapSDK. I guess I'm missing something?

Natipapi avatar Jul 12 '20 22:07 Natipapi

The problem is that you're trying to create an extensible matching filter, but you're using a method to create an equality filter. Those are two completely different types of filters, so the server isn't getting the correct request. Instead of using:

Filter.createEqualityFilter("memberOf:1.2.840.113556.1.4.1941:", dn1)

you should use:

Filter.createExtensibleMatchFilter("memberOf", "1.2.840.113556.1.4.1941", false, dn1)

And by the way, "1.2.840.113556.1.4.1941" references a matching rule rather than a control.

dirmgr avatar Jul 13 '20 05:07 dirmgr