GH-17 invalid exop mountpoints crash server

This commit is contained in:
Mark Cavage 2011-09-23 09:00:28 -07:00
parent be3d5fa7fa
commit a515652ac7
2 changed files with 9 additions and 1 deletions

View File

@ -733,7 +733,7 @@ Server.prototype._getHandlerChain = function(req) {
return {
backend: routes.backend,
handlers: route[op] || [defaultExopHandler]
handlers: route[op] || [noExOpHandler]
};
} else if (req.protocolOp === Protocol.LDAP_REQ_UNBIND) {
function getUnbindChain() {

View File

@ -229,6 +229,14 @@ test('exop invalid', function(t) {
});
test('bogus exop (GH-17)', function(t) {
client.exop('cn=root', function(err, value) {
t.ok(err);
t.end();
});
});
test('modify success', function(t) {
var change = new Change({
type: 'Replace',