Open aaronbloom opened 9 years ago
Upon a further look at the the source of LdapLookup.js in version 0.4.1 it seems that the callback function on line 44 is not handling the error argument when the function is run.
An appropriate patch? snippet line 44 to 56
self._client.search(self._options.base, opts, function(err, res){
if(err) return callback(err); // handle the error - inserted into line 45
var entries = [];
res.on('searchEntry', function(entry) {
entries.push(entry);
});
res.on('error', function(err) {
callback(err);
});
res.on('end', function() {
if(entries.length === 0) return callback(null, null);
callback(null, entries[0].object);
});
});
Hi,
It seems that when unable to communicate with an Active Directory server I get the following uncaught exception.
Many thanks, Aaron
Update:
Only seems to be thrown in the circumstances where the active directory server can be found on application start-up, but then during the applications runtime the server becomes unreachable, upon which a user login triggers the uncaught exception.