node-ldapjs icon indicating copy to clipboard operation
node-ldapjs copied to clipboard

Unhandled exception from ldapJS while LDAP filter strings length exceeds

Open ujjwalchk-it opened this issue 3 years ago • 1 comments

We are getting this exception from ldapJS when the LDAP filter string length exceeds the configured filter string size limit at LDAP end. Observation - Unhandled exception from ldapJS (mentioned below) Expectation - The error should be caught gracefully under res.on('error', (err) => {...})

Unhandled exception -

/Users/ujjwalchakraborty/Desktop/node_modules/ldapjs/lib/errors/index.js:98
  const E = module.exports[errObj.err]
                                  ^

TypeError: Cannot read properties of undefined (reading 'err')
    at Object.module.exports.getError (/Users/ujjwalchakraborty/Desktop/node_modules/ldapjs/lib/errors/index.js:98:35)
    at messageCallback (/Users/ujjwalchakraborty/Desktop/node_modules/ldapjs/lib/client/client.js:1220:45)
    at Parser.onMessage (/Users/ujjwalchakraborty/Desktop/node_modules/ldapjs/lib/client/client.js:888:14)
    at Parser.emit (node:events:520:28)
    at Parser.write (/Users/ujjwalchakraborty/Desktop/node_modules/ldapjs/lib/messages/parser.js:107:8)
    at Socket.onData (/Users/ujjwalchakraborty/Desktop/node_modules/ldapjs/lib/client/client.js:875:22)
    at Socket.emit (node:events:520:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)

Appreciate any advise on this .

ujjwalchk-it avatar May 16 '22 12:05 ujjwalchk-it

Would you like to send a Pull Request to address this issue? Remember to add unit tests. An integration test would also be very welcome.

jsumners avatar May 16 '22 21:05 jsumners

👋

On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.

Please see issue #839 for more information, including how to proceed if you feel this closure is in error.

jsumners avatar Feb 22 '23 19:02 jsumners