From c07d322fff78c0c8aeb5e4aa9f9c0f87c17abcaf Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 3 Mar 2017 10:18:36 +0100 Subject: [PATCH] Do not send ldap records for users without a username set If an app relies on the attribute to be set, apps like owncloud would fail internally. --- src/ldap.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ldap.js b/src/ldap.js index de1937c25..213297f9b 100644 --- a/src/ldap.js +++ b/src/ldap.js @@ -46,6 +46,9 @@ function userSearch(req, res, next) { // send user objects result.forEach(function (entry) { + // skip entries with empty username. Some apps like owncloud can't deal with this + if (!entry.username) return; + var dn = ldap.parseDN('cn=' + entry.id + ',ou=users,dc=cloudron'); var groups = [ GROUP_USERS_DN ];