Skip to content
This repository
Browse code

GH-17 invalid exop mountpoints crash server

  • Loading branch information...
commit a515652ac7bd1877672bf7e8e296d3dc501b9c2d 1 parent be3d5fa
Mark Cavage authored

Showing 2 changed files with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/server.js
  2. +8 0 tst/client.test.js
2  lib/server.js
@@ -733,7 +733,7 @@ Server.prototype._getHandlerChain = function(req) {
733 733
734 734 return {
735 735 backend: routes.backend,
736   - handlers: route[op] || [defaultExopHandler]
  736 + handlers: route[op] || [noExOpHandler]
737 737 };
738 738 } else if (req.protocolOp === Protocol.LDAP_REQ_UNBIND) {
739 739 function getUnbindChain() {
8 tst/client.test.js
@@ -229,6 +229,14 @@ test('exop invalid', function(t) {
229 229 });
230 230
231 231
  232 +test('bogus exop (GH-17)', function(t) {
  233 + client.exop('cn=root', function(err, value) {
  234 + t.ok(err);
  235 + t.end();
  236 + });
  237 +});
  238 +
  239 +
232 240 test('modify success', function(t) {
233 241 var change = new Change({
234 242 type: 'Replace',

0 comments on commit a515652

Please sign in to comment.
Something went wrong with that request. Please try again.