@@ -99,6 +99,7 @@ function LdapAuth(opts) {
99
99
socketPath : opts . socketPath ,
100
100
log : opts . log ,
101
101
timeout : opts . timeout ,
102
+ timeLimit : opts . timeLimit ,
102
103
connectTimeout : opts . connectTimeout ,
103
104
idleTimeout : opts . idleTimeout ,
104
105
reconnect : opts . reconnect ,
@@ -307,6 +308,11 @@ LdapAuth.prototype._findUser = function (username, callback) {
307
308
308
309
var searchFilter = self . opts . searchFilter . replace ( / { { username} } / g, sanitizeInput ( username ) ) ;
309
310
var opts = { filter : searchFilter , scope : self . opts . searchScope } ;
311
+
312
+ if ( self . opts . timeLimit ) {
313
+ opts . timeLimit = self . opts . timeLimit ;
314
+ }
315
+
310
316
if ( self . opts . searchAttributes ) {
311
317
opts . attributes = self . opts . searchAttributes ;
312
318
}
@@ -362,6 +368,11 @@ LdapAuth.prototype._findGroups = function (user, callback) {
362
368
var searchFilter = self . opts . groupSearchFilter ( user ) ;
363
369
364
370
var opts = { filter : searchFilter , scope : self . opts . groupSearchScope } ;
371
+
372
+ if ( self . opts . timeLimit ) {
373
+ opts . timeLimit = self . opts . timeLimit ;
374
+ }
375
+
365
376
if ( self . opts . groupSearchAttributes ) {
366
377
opts . attributes = self . opts . groupSearchAttributes ;
367
378
}
0 commit comments