Commit Graph

125 Commits

Author SHA1 Message Date
Thomas Pressnell fae35237de adding rebind checks 2021-07-12 16:24:01 +01:00
Thomas Pressnell b85c4acb4c adding bindDN adjustments 2021-07-12 16:02:12 +01:00
Tony Brix 9b1a10fff0
Merge branch 'master' into master 2021-05-27 14:13:56 -05:00
Tony Brix 79c1b4ccf3
Merge branch 'master' into master 2021-05-27 14:08:37 -05:00
zhaoyunfeng fb6d18a48d lint: fix lint error. 2021-05-24 13:33:57 +08:00
zhaoyunfeng e74ba91238 feat: now search callback response will emit SearchRequest after every search request is sent 2021-05-24 12:34:32 +08:00
CoryGH 91cac2fdaa
linting typos
linting typos fixed
2021-05-20 12:27:10 -04:00
CoryGH 8a791d4bf0
net dependency
net dependency
2021-05-20 10:40:37 -04:00
CoryGH 534e3dd542
test for multithreading support
tests for multithreading support via non-ldapjs-server and via hook into ldapjs server
2021-05-20 10:33:46 -04:00
Philippe Seewer d064b359d3 Run lint.
Signed-off-by: Philippe Seewer <philippe.seewer@bfh.ch>
2021-05-07 15:50:02 +02:00
Philippe Seewer e07656b233 SearchPager: Implement queueing events until a listener appears
This fixes the same problems for paged searches as does
https://github.com/ldapjs/node-ldapjs/pull/610 for unpaged searches.

By passing an EventEmitter via callback there exist cases when events
are emitted before listeners are registered, resulting in missed
events.

The Change turns SearchPager into a CorkedEmitter which is already
used as a solution for non paged searches. Doing so requires the
internal 'search' event to be dropped.

This change adapts a test case originally by László Szűcs (@ifroz).

Signed-off-by: Philippe Seewer <philippe.seewer@bfh.ch>
2021-05-07 14:04:37 +02:00
Tony Brix a1b4ceed1d fix deprecations 2021-04-05 00:34:59 -05:00
Tony Brix daf1eb8f43 return promises in before/after each 2021-04-05 00:25:32 -05:00
Tony Brix bb475ab00f fix: emit error event if other error events are not listened to 2021-02-23 17:23:56 -06:00
Tony Brix de9926a329 chore(lint): fix no-unused-vars errors 2020-12-06 19:26:27 -06:00
Tony Brix 237d1ec471 remove no-shadow rule in tests 2020-12-06 11:11:03 -06:00
Tony Brix c6fa25985b update devdependency standard to v16 2020-10-31 16:07:32 -05:00
Martin Cizek 85824f8980
Change test ip address.
Co-authored-by: Tony Brix <tony@brix.ninja>
2020-09-18 07:48:12 +02:00
Martin Cizek 23e44b2959 cr 2020-09-17 16:46:34 +02:00
Martin Cizek 543cb976f3 Add connectTimeout to test 2020-09-17 07:35:53 +02:00
Martin Cizek f9ae5c12d8 Add test 2020-09-17 07:05:21 +02:00
Martin Cizek 3ca2c265da Support for arrays in url parameter 2020-09-17 06:28:03 +02:00
James Stenhouse 24d8a6f8b3 remove space from dn comparision 2020-07-28 09:15:46 +10:00
Tony Brix acc1e4ca8d remove uuid 2020-07-22 10:11:48 -05:00
Robert Kawecki c9be815d4f Use a random TCP port for testing timeouts/rejects
This fixes a test failure when the host has something listening
on the LDAP TCP port. Previously, the test cases would assume
that the port was free and they would not connect.

For #612
2020-05-20 23:20:06 +02:00
Robert Kawecki 6b092cf70f Remove spaces from DNs in SearchRequest
This change fixes how DNs are serialized into BER for SearchRequest messages.
It drops spaces around commas, since it breaks some LDAP servers that expect
the DN to be separated by comma only as per RFC 4514. The old format of
spaced separators from LDAPv2 is thus no longer used.

For #611
2020-05-13 17:01:00 +02:00
Robert Kawecki 5204bb7ac0 Implement queueing events until a listener appears
This resolves an issue arising from using both a callback and an EventEmitter
together in the Client.search() API. Since the emitter would only be available
through the callback, some events could be emitted before the callback
is triggered, resulting in missed events.

This change incorporates a test case originally by László Szűcs (@ifroz).

For GH-602
2020-05-12 16:51:28 +02:00
Jon Ekdahl 7c00ca8188 Add server.getConnections (fix #415)
Add LDAP server method that delegates to node server.getConnection.
2020-02-19 20:02:57 +01:00
Thomas P 9a3c7bab61
Merge branch 'next' into fix-bind-crash 2019-11-24 16:33:37 +01:00
James Sumners 1f12eca334
Add integration tests (#571)
* Initial integration test, um, test

* Hack in service

* Add integration test for issue #480

* Add fix for issue #418

* Add fix for issue #370
2019-11-16 10:48:00 -05:00
Thomas P 5afa677209
Also test timeout cases 2019-10-12 00:36:37 +02:00
Thomas P 53d6b36bb2
Add test for connection refused issue 2019-10-11 23:23:05 +02:00
James Sumners 5a31abaed0
Clean up options checking and add some tests 2019-09-29 09:09:18 -04:00
Soisik Froger fa6ffb4504
Merge branch 'next' into next-vls-controls 2019-09-21 17:55:30 +02:00
Tony Brix ed70fd7615 test escaped single hex char at end of filter 2019-09-18 14:46:49 -05:00
Tony Brix ecfefa7ff0 fix escapedToHex capturing \ 2019-09-18 14:35:10 -05:00
James Sumners db8d5f5ccb
Merge branch 'next' into next-vls-controls 2019-09-08 07:34:14 -04:00
sinistersig 06b1804d32 Ensure toString is not called on buffers 2019-09-06 11:27:37 +01:00
Soisik Froger 311c94ef15 Virtual List View control support 2019-09-04 12:13:51 +02:00
James Sumners 92341e770a
Refactor MessageTracker into testable module 2019-08-30 10:50:02 -04:00
James Sumners 2e1ef78108
Refactor client RequestQueue into testable module (#548)
* Refactor client RequestQueue into testable module

* Update test/lib/client/request-queue/enqueue.test.js

Co-Authored-By: Tony Brix <tony@brix.ninja>

* Update test/lib/client/request-queue/enqueue.test.js

Co-Authored-By: Tony Brix <tony@brix.ninja>

* Update test/lib/client/request-queue/enqueue.test.js

Co-Authored-By: Tony Brix <tony@brix.ninja>
2019-08-28 19:15:09 -04:00
James Sumners 528a78bad3
Add test for issue #480 2019-08-28 14:38:04 -04:00
James Sumners 9a8f60767b
Resolve issue #336 2019-08-27 19:01:47 -04:00
James Sumners e2c9b12430
Apply standard linting to the code base (#539)
* Apply standard linting to the code base

* Specify files to lint

* Run lint as first stage

* Update travis config
2019-08-27 17:11:49 -04:00
James Sumners 6b514b97df
Refactor tests to be independent of each other 2019-08-27 14:17:33 -04:00
James Sumners 210d4c6d37
Convert tests back to node-tap 2019-08-27 09:11:52 -04:00
James Sumners bdbc1b1dbd
Merge pull request #529 from dododedodonl/next
Store buffer on extended request
2019-08-27 08:23:34 -04:00
James Sumners a4b8b119a5
Fix privileged port access in tests 2019-08-27 08:06:41 -04:00
dododedodonl b87e4bb288 store buffer on extended request 2019-08-27 14:04:45 +02:00
Stéphane Talbot e4264f7940 add a callback optionnal parameter for server.close method (#528)
* add a callback optionnal parameter for server.close method

net and tls server.close method accept an optional callback parameter.
ldapjs server.close method delegates to net or tls server.close method and accept now an optional callback parameter...

* add tests for server.close callback
2019-08-27 07:57:29 -04:00