diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/auth.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auth.js b/src/auth.js index 5f4c777..d575d60 100644 --- a/src/auth.js +++ b/src/auth.js | |||
@@ -71,8 +71,8 @@ function verifyUser(username, password, callback) { | |||
71 | ldapClient.bind(process.env.CLOUDRON_LDAP_BIND_DN, process.env.CLOUDRON_LDAP_BIND_PASSWORD, function (error) { | 71 | ldapClient.bind(process.env.CLOUDRON_LDAP_BIND_DN, process.env.CLOUDRON_LDAP_BIND_PASSWORD, function (error) { |
72 | if (error) return callback(error); | 72 | if (error) return callback(error); |
73 | 73 | ||
74 | var filter = `(|(uid=${username})(mail=${username})(username=${username})(sAMAccountName=${username}))`; | 74 | var filter = process.env.CLOUDRON_LDAP_FILTER.replace(/\{username\}/g, username); |
75 | ldapClient.search(process.env.CLOUDRON_LDAP_USERS_BASE_DN, { filter: filter }, function (error, result) { | 75 | ldapClient.search(process.env.CLOUDRON_LDAP_USERS_BASE_DN, { filter: filter, scope: "sub" }, function (error, result) { |
76 | if (error) return callback(error); | 76 | if (error) return callback(error); |
77 | 77 | ||
78 | var items = []; | 78 | var items = []; |