Merge branch 'next' into fix-bind-crash
This commit is contained in:
commit
2901e48cb4
|
@ -31,9 +31,9 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
- name: Pull Docker image
|
||||
run: docker pull "docker.pkg.github.com/ldapjs/docker-test-openldap/openldap:1.0"
|
||||
run: docker pull "docker.pkg.github.com/ldapjs/docker-test-openldap/openldap:latest"
|
||||
- name: Start OpenLDAP service
|
||||
run: docker run -it -d --name openldap -p 389:389 -p 636:636 docker.pkg.github.com/ldapjs/docker-test-openldap/openldap:1.0
|
||||
run: docker run -it -d --name openldap -p 389:389 -p 636:636 docker.pkg.github.com/ldapjs/docker-test-openldap/openldap:latest
|
||||
|
||||
- name: Install Packages
|
||||
run: npm install
|
||||
|
|
|
@ -2,7 +2,7 @@ version: '3'
|
|||
|
||||
services:
|
||||
openldap:
|
||||
image: docker.pkg.github.com/ldapjs/docker-test-openldap/openldap:1.0
|
||||
image: docker.pkg.github.com/ldapjs/docker-test-openldap/openldap:latest
|
||||
ports:
|
||||
- 389:389
|
||||
- 636:636
|
||||
|
|
|
@ -1160,7 +1160,7 @@ Client.prototype._sendSocket = function _sendSocket (message,
|
|||
var sentEmitter = false
|
||||
|
||||
function sendResult (event, obj) {
|
||||
if (event === 'error' && self.listeners('resultError')) {
|
||||
if (event === 'error') {
|
||||
self.emit('resultError', obj)
|
||||
}
|
||||
if (emitter) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "ldapjs",
|
||||
"homepage": "http://ldapjs.org",
|
||||
"description": "LDAP client and server APIs",
|
||||
"version": "2.0.0-pre.3",
|
||||
"version": "2.0.0-pre.4",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"husky": "^3.0.4",
|
||||
"snazzy": "^8.0.0",
|
||||
"standard": "^14.0.2",
|
||||
"tap": "^14.6.1",
|
||||
"tap": "14.10.1",
|
||||
"uuid": "^3.3.3"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -56,3 +56,36 @@ tap.test('whois works correctly (issue #370)', t => {
|
|||
})
|
||||
})
|
||||
})
|
||||
|
||||
tap.test('can access large groups (issue #582)', t => {
|
||||
const client = ldapjs.createClient({ url: baseURL })
|
||||
client.bind('cn=admin,dc=planetexpress,dc=com ', 'GoodNewsEveryone', (err) => {
|
||||
t.error(err)
|
||||
const searchOpts = {
|
||||
scope: 'sub',
|
||||
filter: '(&(objectClass=group)(cn=large_group))'
|
||||
}
|
||||
client.search('ou=large_ou,dc=planetexpress,dc=com', searchOpts, (err, response) => {
|
||||
t.error(err)
|
||||
|
||||
const results = []
|
||||
response.on('searchEntry', (entry) => {
|
||||
results.push(entry)
|
||||
})
|
||||
response.on('error', t.error)
|
||||
response.on('end', (result) => {
|
||||
t.is(result.status, 0)
|
||||
t.is(results.length === 1, true)
|
||||
t.ok(results[0].attributes)
|
||||
|
||||
const memberAttr = results[0].attributes.find(a => a.type === 'member')
|
||||
t.ok(memberAttr)
|
||||
t.ok(memberAttr.vals)
|
||||
t.type(memberAttr.vals, Array)
|
||||
t.is(memberAttr.vals.length, 2000)
|
||||
|
||||
client.unbind(t.end)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue