Commit Graph

65 Commits

Author SHA1 Message Date
Daniel Fiterman 02077a2779 force socket to be closed on destroy 2022-02-25 13:39:20 -05:00
Tony Brix bab1dfcf4b
Merge branch 'master' into clientFix 2021-08-03 10:07:44 -05:00
John Johnston b6d60b9010 chore: 'add buffer' unit test 2021-08-01 12:38:00 -07:00
John Johnston 4c75096c80 chore: add 'modify DN excessive superior length' unit test 2021-07-31 14:52:13 -07: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
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 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 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
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 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 528a78bad3
Add test for issue #480 2019-08-28 14:38:04 -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 f1acfee9de
Merge pull request #522 from UziTech/update-uuid
update uuid and tests to work with windows
2019-08-26 12:12:34 -04:00
James Sumners ac55fba157
Merge pull request #405 from pbatey/master
destroy socket if auto-bind fails
2019-08-26 07:52:22 -04:00
Manfred Steiner b66da2c76e rebase to branch next, fixing issue #434 (can delete attributes) 2019-08-26 08:22:26 +02:00
Phil Batey 5f21dbf4cd destroy socket if auto-bind fails 2019-08-25 16:58:23 -06:00
Tony Brix 2ce7468ac2 update uuid and tests to work with windows 2019-08-25 12:27:39 -05:00
James Sumners 2e2a0783bf
Create new instances of the null logger to remove potential side effects 2019-08-24 21:04:23 -04:00
James Sumners e9e8033fda
Remove dependency on Bunyan 2019-08-24 20:51:40 -04:00
Patrick Mooney c10a1a6faf Clean up client handling of end/error for searches 2015-10-15 21:49:34 -05:00
Patrick Mooney 821569c2c4 Implement client-side StartTLS support 2015-05-13 22:26:42 -05:00
Patrick Mooney ec062d370c Improve empty DN handling
- Use more strict comparisons for client input asserts
- Fix baseObject comparison in SearchRequest initialization
- Alter default error for server route fallthrough
2015-04-25 20:53:50 -05:00
Matt Simerson 19f2c16783 Allow simple client bind with empty credentials
Fix mcavage/node-ldapjs#254
2015-04-13 23:40:58 -05:00
Patrick Mooney b70bdaa26b Cleanup lint/cruft 2014-07-29 10:21:57 -05:00
Patrick Mooney de16802a16 Fix SearchPager bugs, improve test coverage 2014-07-25 14:16:31 -05:00
Patrick Mooney 8fd16ee255 Add resultError event to client
Detecting certain types of errors in encountered during any operation
(such as BusyError or UnavailableError) can be useful for making
client-wide decisions.
2014-07-25 13:35:15 -05:00
Patrick Mooney d665378c0e Improve client paged search handling
Search response objects now include more instrumentation and control when
automatically fetching paged results.  See the SearchPager documentation
for more details.

Fix mcavage/node-ldapjs#203
2014-07-24 15:41:24 -05:00
Patrick Mooney 48bd7bfe82 Fix message parsing for length-sensitive types
Certain LDAP messages (such as DeleteRequest) encode their contents as
raw bytes within the top-level sequence object.  As such, they rely
their length being passed to them when LDAPMessage decodes the sequence.

This was being done incorrectly, but would not manifest itself as a
problem unless controls followed the message.  If no controls were
present, then length of the sequence item was bounded by the message
itself and the parse would succeed.

Fix mcavage/node-ldapjs#212
2014-07-16 18:53:06 -05:00