Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
This repository was archived by the owner on May 14, 2024. It is now read-only.

Non ascii characters in filter not working in client search #936

Closed as not planned
@jimmyengman

Description

@jimmyengman

If I start an OpenLDAP docker container as suggested in https://github.com/ldapjs/docker-test-openldap and then connect to it with ldap.createClient I can search with filter sn=Conrad and get a searchEntry for Hermes Conrad printed but when I search for sn=Rodríguez no entry is found.

import { default as ldap } from 'ldapjs';

// ************ if this opts are used an entry will be printed ************
// const opts = {
// filter: '(&(sn=Conrad)',
// scope: 'sub',
// attributes: ['dn', 'sn', 'cn'],
// type: 'user'
// };

// ************ using this opts no entry is found *****************
const opts = {
filter: '(&(sn=Rodríguez)',
scope: 'sub',
attributes: ['dn', 'sn', 'cn'],
type: 'user'
};

client.search('dc=planetexpress,dc=com', opts, (err, res) => {

res.on('searchRequest', (searchRequest) => {
console.log('searchRequest: ', searchRequest.messageId);
});
res.on('searchEntry', (entry) => {
console.log('entry: ' + JSON.stringify(entry.pojo));
});
res.on('searchReference', (referral) => {
console.log('referral: ' + referral.uris.join());
});
res.on('error', (err) => {
console.error('error: ' + err.message);
});
res.on('end', (result) => {
console.log('status: ' + result.status);
});
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions