Commit Graph

67 Commits

Author SHA1 Message Date
James Sumners cb70776445 Replace protocol with module (#806) 2023-02-22 14:09:27 -05:00
James Sumners 9fe58a44a2 Swap asn1 package 2023-02-22 14:09:27 -05:00
Max Leiter 188870d7b5
Progress on supporting IPv6 (#805)
* Progress on supporting IPv6

* Apply suggestions from code review

Co-authored-by: James Sumners <james@sumners.email>

* tests: add IPv6 URL format test to server.test.js

Co-authored-by: James Sumners <james@sumners.email>
2022-06-07 20:59:33 -04:00
Thomas Pressnell 5598feda6d use getter 2021-07-12 16:32:06 +01:00
Thomas Pressnell b85c4acb4c adding bindDN adjustments 2021-07-12 16:02:12 +01:00
James Sumners c2494eca00
Apply suggestions from code review 2021-05-21 08:04:41 -04:00
CoryGH 992be5a557
adding connectionRouter hook
adding connectionRouter hook back in
2021-05-20 10:35:13 -04:00
CoryGH 6cce4f60cc
removing hook while keeping newConnection change
removal of hook while keeping `newConnection` change from private to public for use in multithreaded applications
2021-05-20 07:21:52 -04:00
CoryGH bca931a4cd
connection router to accomodate multithreading
connection router hook added to accommodate multithreaded servers
2021-05-19 14:36:51 -04:00
Tony Brix 2489d87079 chore(lint): lint lib/ 2020-12-06 11:10:58 -06: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
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 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
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
Patrick Mooney 5b8cbb755b Fix strict DN parsing in server 2015-10-31 09:03:53 -05:00
Patrick Mooney e8607819e2 Move server getters/setters to prototype 2015-10-31 08:34:51 -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 495ea2afce Overhaul DN parsing and formatting
Certain applications depend upon DN string formatting in a manner more
strict than specified in the RFC.  To enable format transcription and
reproduction, some changes were made to how DNs are converted to/from
strings.

- Store RDN strings raw instead of escaped
- Record formatting details during DN/RDN parsing
- Add DN.format method to control format recreation
- Remove DN.spaced method in favor of DN.setFormat

Fix mcavage/node-ldapjs#176
2015-02-17 15:35:06 -06: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 d9b2b1378e Properly dispatch unbind requests
Fix mcavage/node-ldapjs#197
2014-06-06 14:05:08 -05:00
Patrick Mooney 5a6e781293 Handle string ports properly in server.listen
Parse port as an integer when possible in server.listen.  In addition to
fixing server.url output, this avoids some weird socket reuse behavior
when mixing string and integer types passed to net.listen.

Fix mcavage/node-ldapjs#196
2014-06-06 12:21:05 -05:00
Patrick Mooney e92977b514 Refactor server route handling
Force route lookups to proceed lexically through mounted endpoint DNs.
Mounting to a null ('') DN will act as the default route for requests
which aren't matched by defined routes.

Fix mcavage/node-ldapjs#154
Fix mcavage/node-ldapjs#111
2014-06-05 16:53:23 -05:00
Tobias Muellerleile e3d8ba2f37 Fixup for 501fb5a46b 2014-05-06 14:33:43 +02:00
Tobias Muellerleile 501fb5a46b Accept buffers for cert/key in createServer 2014-05-06 07:36:18 +02:00
Patrick Mooney df13275b8e Output ldapi:// URLs for UNIX domain sockets 2013-10-29 23:46:48 -05:00
Patrick Mooney d4a9d371f0 Re-enable ability to listen on UNIX domain sockets 2013-10-29 23:29:21 -05:00
Lloyd Hilaiel 04eab4716c allow binding ldap server on an ephemeral port 2013-05-27 14:49:44 -06:00
Pedro P. Candel 3c1feec071 Instead of log with error log level, emit "clientError" and let each ldap server decide how to log. 2012-09-11 11:49:37 +02:00
Pedro P. Candel 5cd593a5ec Log errors with error log level instead of trace. 2012-09-10 09:09:50 +02: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
Mark Cavage a499a7cfd5 Addition of javascriptlint 2012-01-24 09:43:46 -08:00
Mark Cavage fb63ba2220 lint cleanup, and extensible matching 2012-01-19 14:00:23 -08:00
Mark Cavage 040dfa51fa GH-47 Server crash in c.on('data') 2012-01-09 08:24:14 -08:00
Mark Cavage f8c46a4c20 GH-13 server.use() 2012-01-06 15:10:46 -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 8cfcdadd18 Wrong probe on connect event 2011-11-16 10:59:53 -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 fdd3184420 remove extraneous console.log 2011-11-07 17:24:56 -08:00
Mark Cavage 8c212908a0 more dn/server cleanup 2011-11-07 17:23:38 -08:00
Mark Cavage 28ddaaad69 Minor cleanup of server handling and null DNs 2011-11-07 17:12:59 -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 5cf425de72 Fill in c.remoteAddress for TLS connections 2011-11-07 12:05:45 -08:00
Mark Cavage 03dad8c9a1 SSL server looking for certificate, not cert 2011-10-18 10:15:14 -07:00
Mark Cavage 01a6cfb77e GH-14: Support null/empty attribute values 2011-09-30 10:48:56 -07:00
Mark Cavage 1105b47293 Allow empty dns in search (e.g., enable rootDSE searches) 2011-09-29 09:35:53 -07:00