Commit Graph

14 Commits

Author SHA1 Message Date
James Stenhouse 24d8a6f8b3 remove space from dn comparision 2020-07-28 09:15:46 +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
James Sumners 210d4c6d37
Convert tests back to node-tap 2019-08-27 09:11:52 -04:00
dododedodonl b87e4bb288 store buffer on extended request 2019-08-27 14:04:45 +02: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 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 3186f5eca1 Convert tests to use tape/istanbul/faucet 2014-07-08 15:09:26 -05:00
Patrick Mooney 0d12eef3ff Improve DN formatting flexibility
- Add 'spaced' function to DN objects allowing toggle of inter-RDN when
  rendering to a string.  ('dc=test,dc=tld' vs 'dc=test, dc=tld')

- Detect RDN spacing when parsing DN.
2013-10-24 18:27:42 -05:00
Mark Cavage 15c6e32801 add logger to del_request test 2012-02-18 11:47:58 -08:00
Mark Cavage afeb354eac Initial setup for 0.5 (use eng.git layout) 2012-02-18 08:15:52 +00:00