node-ldapjs
node-ldapjs copied to clipboard
Bug in Client enqueue
I was just going over the code in ldapjs version 2.3.3
In file lib/client/request-queue/enqueue.js there are lines around line 17
if (this._queue.length >= this.size || this._frozen) { return false }
I think this is a bug because the this._queue is a Set, not an Array. Set does not have the length property, it has the size
This bug will result if this condition to always evaluate to false, so setting the queue size will have no effect, the queue will always behave as if can take unlimited number of items. Potentially can cause serious memory leak.
Can you highlight where this._queue
is defined as a set?
This is where _queue is defined: lib/client/request-queue/index.js
Line 23 _queue: new Set()
Please use https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet
⚠️ This issue has been locked due to age. If you have encountered a recent problem that seems to be covered by this issue, please open a new issue.
Please include a minimal reproducible example when opening a new issue.