mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
11 lines
384 B
JavaScript
11 lines
384 B
JavaScript
// Baseline: filter is a literal constant; no taint reaches the search call.
|
|
const ldap = require('ldapjs');
|
|
|
|
const client = ldap.createClient({ url: 'ldap://example.com' });
|
|
|
|
function lookup(_req, res) {
|
|
const filter = '(objectClass=person)';
|
|
client.search('ou=people,dc=example,dc=com', { filter: filter }, (err) => { res.json({ ok: !err }); });
|
|
}
|
|
|
|
module.exports = lookup;
|