Hi Team,
We are working on migration of nsldap C sdk to OpenLDAP C sdk for our application client code.
As part of this activity, from our application, we are sending one search query using search API (Ex: ldap_search_ext_s) to one of LDAP servers with a filter: smVariableName=dzORGS== In this search filter, escape character () is added for equals to (=) symbols.
We expected a successful result for this query as we have a valid entry. But the LDAP search call failed. By high level investigation, it was identified that the search call did not reach the LDAP server and OpenLDAP API internally returned failure status by saying BAD filter.
Note: With the same client application code (where search filter and search API is same), using nsldap C SDK, we are able to execute the query successfully and able to see results.
Could you please let me know if I missed any specific configuration/setting in OpenLDAP APIs before making a search? OR Do we need to change the search filter value (remove escape character) for OpenLDAP APIs?
--On Friday, July 19, 2024 1:12 PM +0000 c.venugopal521@gmail.com wrote:
Hi Team,
We are working on migration of nsldap C sdk to OpenLDAP C sdk for our application client code.
As part of this activity, from our application, we are sending one search query using search API (Ex: ldap_search_ext_s) to one of LDAP servers with a filter: smVariableName=dzORGS== In this search filter, escape character () is added for equals to (=) symbols.
Hello,
OpenLDAP filter escaping complies with RFC 4515. https://datatracker.ietf.org/doc/html/rfc4515
Regards, Quanah
openldap-technical@openldap.org