diff --git a/lib/messages/search_entry.js b/lib/messages/search_entry.js index ee48a0f..71e4091 100644 --- a/lib/messages/search_entry.js +++ b/lib/messages/search_entry.js @@ -88,10 +88,8 @@ SearchEntry.prototype.fromObject = function(obj) { attr.vals.push(v); }); - } else if (typeof(obj[k]) === 'string') { - attr.vals.push(obj[k]); } else { - throw new TypeError(k + ' -> ' + obj[k] + ' is not a string'); + attr.vals.push(obj[k] + ''); } self.attributes.push(attr); diff --git a/lib/messages/search_response.js b/lib/messages/search_response.js index b1ac48e..438458b 100644 --- a/lib/messages/search_response.js +++ b/lib/messages/search_response.js @@ -53,8 +53,6 @@ SearchResponse.prototype.send = function(entry, nofiltering) { if (entry.messageID !== this.messageID) throw new Error('SearchEntry messageID mismatch'); } else { - if (!entry.dn) - throw new Error('entry.dn required'); if (!entry.attributes) throw new Error('entry.attributes required'); diff --git a/lib/server.js b/lib/server.js index add49c1..1116128 100644 --- a/lib/server.js +++ b/lib/server.js @@ -782,10 +782,10 @@ Server.prototype._getHandlerChain = function(req) { Server.prototype._mount = function(op, name, argv, notDN) { assert.ok(op); - assert.ok(name); + assert.ok(name !== undefined); assert.ok(argv); - if (!name || typeof(name) !== 'string') + if (typeof(name) !== 'string') throw new TypeError('name (string) required'); if (argv.length < 1) throw new Error('at least one handler required');