Commit Graph

54 Commits

Author SHA1 Message Date
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
Mark Cavage e2cac51a29 GH-18: Server not handling unknown message types gracefull 2011-09-26 13:47:33 -07:00
Mark Cavage a515652ac7 GH-17 invalid exop mountpoints crash server 2011-09-23 09:00:28 -07:00
Mark Cavage fcec8d626f handle objectclass as lower case vals in add/search, error handling cleanup and some minor fixes 2011-09-15 14:49:00 -07:00
Mark Cavage 0e77b69dc0 Server after chain support, and minor metrics 2011-09-13 14:49:21 -07:00
Mark Cavage e365d40c8d Refactor DTrace handlers to support a backend object 2011-09-09 13:40:25 -07:00
Mark Cavage 7aa1bfe586 DTrace rework; now supporting a conn/message specific ID so you can track latency 2011-08-30 18:12:34 +00:00
Mark Cavage 7f43ade50b Initial DTrace prototype 2011-08-30 04:48:05 +00:00
Mark Cavage 695f2e4367 Initial DTrace prototype 2011-08-29 17:24:50 -07:00
Mark Cavage d33e7cc26a Docs and anonymous bind support 2011-08-24 12:38:23 -07:00
Mark Cavage 7859f34b8a docs for dns, errors, filters and server, and minor fixes found along the way 2011-08-23 16:25:07 -07:00
Mark Cavage 11fbda69e7 Schema support for add/mofify 2011-08-19 15:08:45 -07:00
Mark Cavage 120e0011a3 Rework server mount APIs 2011-08-15 09:44:31 -07:00
Mark Cavage dda17ef190 lots of fixes. committing the last few days of work. (my commit messages are useless right now) 2011-08-12 16:37:47 -07:00