@@ -99,6 +99,7 @@ function LdapAuth(opts) {
9999 socketPath : opts . socketPath ,
100100 log : opts . log ,
101101 timeout : opts . timeout ,
102+ timeLimit : opts . timeLimit ,
102103 connectTimeout : opts . connectTimeout ,
103104 idleTimeout : opts . idleTimeout ,
104105 reconnect : opts . reconnect ,
@@ -307,6 +308,11 @@ LdapAuth.prototype._findUser = function (username, callback) {
307308
308309 var searchFilter = self . opts . searchFilter . replace ( / { { username} } / g, sanitizeInput ( username ) ) ;
309310 var opts = { filter : searchFilter , scope : self . opts . searchScope } ;
311+
312+ if ( self . opts . timeLimit ) {
313+ opts . timeLimit = self . opts . timeLimit ;
314+ }
315+
310316 if ( self . opts . searchAttributes ) {
311317 opts . attributes = self . opts . searchAttributes ;
312318 }
@@ -362,6 +368,11 @@ LdapAuth.prototype._findGroups = function (user, callback) {
362368 var searchFilter = self . opts . groupSearchFilter ( user ) ;
363369
364370 var opts = { filter : searchFilter , scope : self . opts . groupSearchScope } ;
371+
372+ if ( self . opts . timeLimit ) {
373+ opts . timeLimit = self . opts . timeLimit ;
374+ }
375+
365376 if ( self . opts . groupSearchAttributes ) {
366377 opts . attributes = self . opts . groupSearchAttributes ;
367378 }
0 commit comments