Commit Graph

72 Commits

Author SHA1 Message Date
John Johnston badf820523 fix: modifyDn length fix 2021-07-29 08:53:40 -07:00
Tony Brix de9926a329 chore(lint): fix no-unused-vars errors 2020-12-06 19:26:27 -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
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
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
dododedodonl b87e4bb288 store buffer on extended request 2019-08-27 14:04:45 +02:00
Patrick Mooney df43cab12d Clean up getters/setters and asserts in messages 2015-10-31 12:28:25 -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
Patrick Mooney 408e7c9f99 Support invalid DNs in client/server
Some LDAP implementations (mainly AD and Outlook) accept and/or output
DNs that are not valid.  To support interaction with these invalid DNs a
strictDN flag (default: true) has been added to the client and server
constructors.  Setting this flag to false will allow use of
non-conforming DNs.

When disabling strictDN in the ldapjs client, strings which wouldn't
parse into a DN can then be passed to the ldap operation methods.  It
also means that some methods (such as search) may return results with
string-formatted DNs instead of DN objects.

When disabling strictDN in the ldapjs server, incoming requests that
contain invalid DNs will be routed to the default ('') handler for that
operation type.  It is your responsiblity to differentiate between
string-type and object-type DNs in those handlers.

Fix mcavage/node-ldapjs#222
Fix mcavage/node-ldapjs#146
Fix mcavage/node-ldapjs#113
Fix mcavage/node-ldapjs#104
2014-09-30 18:39:19 -05:00
Patrick Mooney 92362e01f3 Improve parser error handling
- Wrap parser errors with VError
- Catch initial potential sequence errors
- Improve parser test coverage
- Emit parser errors instead of implicitly logging

Fix mcavage/node-ldapjs#221
2014-09-16 15:23:21 -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
Patrick Mooney 7c7c480eb8 Improve parser error handling
In cases where one side of the connection is not communicated with valid
ASN.1/BER, it would be better to fire an error event rather than let the
exception bubble all the way up.

Fix mcavage/node-ldapjs#142
2014-03-15 16:06:42 -05:00
Patrick Mooney c5cfc48da4 Remove buffertools dependency 2014-01-20 09:34:11 -06:00
Patrick Mooney bc19a98d06 Update buffertools dependency
Buffertools 2.0.1 is required to build on VC2013.
With the change to v2.x, the buffertools.extend() method must be called
to mimic the prototype extention behavior of the 1.x versions.

Fix mcavage/node-ldapjs#163
2014-01-18 14:42:21 -06:00
Mark Cavage bc897f9fd4 lint/test cleanup 2014-01-17 09:52:26 -08:00
Gonzalo Huerta-Canepa fce043d6d0 Allow ext request message to have a buffer value in order to accomodate rfc3062 exop 2014-01-03 12:47:42 +00:00
Pedro Palazón Candel 6c00badd95 Fixed Typo on AddRequest.getAttribute 2013-10-08 19:57:53 +02:00
Mark Cavage 5157e72f5d Merge branch 'master' of git://github.com/morphar/node-ldapjs into morphar-master 2013-01-31 01:06:40 +00:00
Mark Cavage 0535dd8534 version bump 2013-01-29 18:38:39 +00:00
Doug Campbell efb3ea98b7 make changes recommended in Issue 97 2013-01-14 17:14:35 +08:00
Dan Larsen 2435d1cf93 Added a raw getter to be able to extract images correctly 2012-12-07 23:07:53 +01:00
Mark Cavage 0da050009b Bad event handling, and working with node 0.8 2012-07-09 13:00:51 +00:00
Mark Cavage fd9d713cdc Fix client memory leaks 2012-07-09 12:23:53 +00:00
Mark Cavage 7ff50f43f4 Initial switch to bunyan 2012-02-18 08:54:22 +00:00
Mark Cavage afeb354eac Initial setup for 0.5 (use eng.git layout) 2012-02-18 08:15:52 +00:00
Yunong Xiao f4729032dd add persistent search to cli 2011-12-20 15:04:59 -08:00
Yunong Xiao e6a007e032 minor fixes to revert new lines. 2011-12-19 17:09:38 -08:00
Yunong Xiao cbf809c856 add support for entry change notification control 2011-12-19 16:52:48 -08:00
Mark Cavage ebde1df00c Minor refactoring of PersistentSearchControl commit 2011-12-08 14:54:40 -08:00
Yunong Xiao 2240f29cc3 "refactored controls into its own directory, minor bug fixes" 2011-12-08 11:22:35 -08:00
Yunong Xiao ee88fc7019 "added ability to deserialize ldap persistent search controls" 2011-12-07 17:02:17 -08:00
Mark Cavage e9c1de31f9 Don't actually delete the attributes in res.send() 2011-11-22 13:29:19 -08:00
Mark Cavage 57831b56d1 DTrace rework so probes always fire 2011-11-18 16:39:37 -08:00
Mark Cavage fe8294319c DTrace rework 2011-11-15 10:49:23 -08:00
Mark Cavage 868c46bde4 GH-26 rewrite network parser 2011-11-11 10:09:20 -08:00
Mark Cavage 6b6eaadf6d GH-33 Allow non-DN binds for AD 2011-11-09 14:57:22 -08:00
Mark Cavage 75aba691f1 GH-27 Support for abandon operations client side, and noop it server side 2011-11-07 14:14:01 -08:00
Mark Cavage a80758b917 Minor client argument fixes, and broken search response send() with no filtering option 2011-10-18 12:31:52 -07:00
Mark Cavage ccff51804a Refactor search_response.send() so that hidden variable magic works 2011-10-17 16:37:09 -07:00
Mark Cavage c20030f5bb GH-21 Support for binary attributes 2011-10-11 13:56:16 -07:00
Mark Cavage 9610cbe9d3 GH-24: support clients asking for * in attribute search selection list 2011-10-11 11:39:56 -07:00
Mark Cavage 7dbeca1fdd GH-23 case insensitive attribute filtering in searchResponse.send() 2011-10-11 10:43:27 -07:00
Mark Cavage 7763cf3789 GH-22: Client should preserve attribute type casing 2011-10-04 10:27:43 -07:00
Mark Cavage 01a6cfb77e GH-14: Support null/empty attribute values 2011-09-30 10:48:56 -07:00