- Use more strict comparisons for client input asserts
- Fix baseObject comparison in SearchRequest initialization
- Alter default error for server route fallthrough
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
Fixmcavage/node-ldapjs#176
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.
Fixmcavage/node-ldapjs#222Fixmcavage/node-ldapjs#146Fixmcavage/node-ldapjs#113Fixmcavage/node-ldapjs#104
The client now blackholes any socket errors after sending an unbind.
This prevents servers which issue RST from causing unecessary errors for
what was a succesful operation.
Fixmcavage/node-ldapjs#217
Detecting certain types of errors in encountered during any operation
(such as BusyError or UnavailableError) can be useful for making
client-wide decisions.
Search response objects now include more instrumentation and control when
automatically fetching paged results. See the SearchPager documentation
for more details.
Fixmcavage/node-ldapjs#203
In cases where a reconnect-enabled client has been manually disconnected
via unbind, it may be desirable to initiate a reconnect without
incurring other client actions.
The old Attribute.isAttribute would allow objects lacking the toBer
method to be attached to Change objects. This would result in errors
during serialization.
With the stricter Attribute detection, it's necessary to convert
Attribute-like objects containing type (string) and vals (array)
properties into real Attribute objects. This precise detection is
necessary to avoid falling back to the object-keys-into-attributes
That other logic which will turn a well structured Attribute-like object
such as this:
{ type: 'valid', vals: ['something'] }
... and turn it into something broken like this:
[
{ type: 'type', vals: ['valid'] },
{ type: 'vals', vals: ['something'] }
]
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.
Fixmcavage/node-ldapjs#212
The pooled client would automatically bind when initializing connections
if bindDN and bindCredentials were passed to during construction.
This convenience should be supported in the plain client too.
If the client queue was enabled and requests were made during the
reconnect process (but after one unsuccessful connection attempt), they
would spawn concurrent reconnection attempts.
A client configured to reconnect should do so on socket close unless
unbind was called explicitly. This covers cases where the connection
undergoes clean but unexpected termination.
- Emit setupError for errors during client setup
- Client accepts more generic options.reconnect
- Fix unbind hang in client.destroy
- Add tests for client reconnect/setup scenarios
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.
Fixmcavage/node-ldapjs#196
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.
Fixmcavage/node-ldapjs#154Fixmcavage/node-ldapjs#111
Store the value portion of EqualityFilter objects in raw attribute.
Certain binary-only comparisons (such as GUIDs or objectSIDs) are
difficult, if not impossible, to handle without direct binary access.
When initializing an Attribute object, the 'vals' option field was being
loosely tested for content presence. By changing this test to a strict
comparison against undefined, Attribute object creation will be more
consistent across input values.
Fixmcavage/node-ldapjs#178
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.
Fixmcavage/node-ldapjs#142
It appears that in node.js (at least recent versions), the 'close' event
is not emitted by TLS sockets. The CleartextStream class specifies that
the 'close' event is optional, so such operation is allowed. In order
to compensate, the event can be trapped at the raw net.socket instead.
Fixmcavage/node-ldapjs#161
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.
Fixmcavage/node-ldapjs#163
Client actions utilizing an EventEmitter may generate unhandled errors,
especially during initial connection. Tracking whether the emitter has
been sent via callback is critical for proper routing of such errors.
Fixmcavage/node-ldapjs#144
- 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.