Skip to content

Commit

Permalink
fix: attributes is not always set
Browse files Browse the repository at this point in the history
  • Loading branch information
vesse committed Jun 22, 2022
1 parent 4719a19 commit 115242f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ldapauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ LdapAuth.prototype._findUser = function(username, callback) {

// groupDnProperty will be accessed in the user returned by the search, and
// so needs to be requested from the LDAP server.
if (self.opts.groupDnProperty && !opts.attributes.includes(self.opts.groupDnProperty)) {
if (opts.attributes && self.opts.groupDnProperty && !opts.attributes.includes(self.opts.groupDnProperty)) {
opts.attributes.push(self.optss.groupDnProperty);
}

Expand Down

0 comments on commit 115242f

Please sign in to comment.