Unhandled exception from ldapJS while LDAP filter strings length exceeds
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 .
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.
👋
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.