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
2489d87079
chore(lint): lint lib/
2020-12-06 11:10:58 -06:00
Girish Ramakrishnan
217b984839
Fix crash in res.send()
...
In commit c6fa25985b
, "var" usage
was replaced with const. The code previously worked because "var"
has function scoping unlike const which has block scoping.
TypeError: Cannot read property 'attributes' of null
2020-12-02 14:44:33 -08:00
Telepsis
95b4ebd618
Remove use of logging methods in conditional tests
2020-11-12 12:38:56 -05:00
Tony Brix
c6fa25985b
update devdependency standard to v16
2020-10-31 16:07:32 -05:00
Tony Brix
07555253ac
chore(lint): fix linting errors
2020-10-24 16:22:11 +00:00
Martin Cizek
cf29972990
fix
2020-09-18 15:36:12 +02:00
Martin Cizek
c861135f80
Don't randomize first server
2020-09-18 15:32:22 +02:00
Martin Cizek
f3804bbca6
cr
2020-09-18 06:15:25 +02:00
Martin Cizek
d32a765ee9
cr
2020-09-17 17:49:58 +02:00
Martin Cizek
f0c864ca85
Revert redundant changes
2020-09-17 16:58:16 +02:00
Martin Cizek
23e44b2959
cr
2020-09-17 16:46:34 +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
Martin Cizek
7d52f867a0
Client support multiple servers
2020-09-16 14:06:26 +02:00
spookiej
53c6275610
Merge branch 'master' into 645-search-response-spaces-dn
2020-07-28 08:53:58 +10:00
Tony Brix
d2c5464bc2
no need to create instance
2020-07-21 20:28:15 -05:00
Robert Kawecki
1a09e62eda
Make false check explicit in isBerWriter comparison
...
Co-authored-by: James Sumners <james@sumners.email>
2020-07-21 13:51:49 +02:00
Robert Kawecki
4318b28198
Integrate falsy check into isBerWriter to avoid long inline conditions
...
For #629
2020-07-21 13:34:59 +02:00
Robert Kawecki
b0b5e935c7
Add duck-type check for BerWriter in filter#toBer mixin
...
For #629
2020-07-17 09:19:10 +02:00
Robert Kawecki
3c5138de26
Remove instanceof check in filter#toBer mixin
...
For #629
2020-07-17 09:19:10 +02:00
James Stenhouse
6efc5e0c43
fix spaces in returned ObjectName
2020-07-04 19:05:59 +10: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
James Sumners
2901e48cb4
Merge branch 'next' into fix-bind-crash
2019-12-15 08:25:23 -05:00
Mathias Lundell
d7d2e99275
refactor: resultError always emitted on error
2019-12-03 17:14:05 +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
c27e14960e
Avoid handling all errors now that blocking errors are handled properly
2019-10-12 00:35:19 +02:00
Thomas P
eda98986f2
FIX: Refused connections are now handled gracefully
2019-10-12 00:34:27 +02:00
Thomas P
d702c455bd
Refactor the patch to limit its scope to bind actions
...
This way, other tests keep passing
2019-10-11 23:23:46 +02:00
Thomas P
bc61f67b12
Lint fixes
2019-10-11 22:54:53 +02:00
Thomas P
ce243d5318
Update the patch to use the logger interface
2019-10-11 22:42:44 +02:00
Matthew Nakama
79f3625f61
handle Client.emit('error') events
...
This prevents node crashes from Client.bind() and etc.
We set a callback handler in the instance during bind()
and send errors to it.
2019-10-11 22:41:17 +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
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
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
bdbc1b1dbd
Merge pull request #529 from dododedodonl/next
...
Store buffer on extended request
2019-08-27 08:23:34 -04:00
acappella2017
a8b09f3f81
Support Node.js 10 ( #497 )
...
* Support node 10
* remove arrow function
2019-08-27 08:10:45 -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