Skip to content

Commit

Permalink
[FIX] LDAP fails to sync teams when the user DN has escaped character…
Browse files Browse the repository at this point in the history
…s. (#26535)
  • Loading branch information
pierre-lehnen-rc authored and sampaiodiego committed Aug 11, 2022
1 parent f414e64 commit 8cca365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/ee/server/lib/ldap/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class LDAPEEManager extends LDAPManager {
filter: filter
.replace(/#{username}/g, username)
.replace(/#{groupName}/g, groupName)
.replace(/#{userdn}/g, dn),
.replace(/#{userdn}/g, dn.replace(/\\/g, '\\5c')),
scope: 'sub',
};

Expand Down Expand Up @@ -402,7 +402,7 @@ export class LDAPEEManager extends LDAPManager {
}

const searchOptions = {
filter: query.replace(/#{username}/g, username).replace(/#{userdn}/g, dn),
filter: query.replace(/#{username}/g, username).replace(/#{userdn}/g, dn.replace(/\\/g, '\\5c')),
scope: ldap.options.userSearchScope || 'sub',
sizeLimit: ldap.options.searchSizeLimit,
};
Expand Down

0 comments on commit 8cca365

Please sign in to comment.