1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-10 13:23:18 +00:00

if no dc= in rootPath, just return pathPrefix

This commit is contained in:
Kyle Spearrin
2020-03-13 10:12:17 -04:00
parent 90f1a1c115
commit bc927a65ac

View File

@@ -231,6 +231,9 @@ export class LdapDirectoryService implements DirectoryService {
}
private makeSearchPath(pathPrefix: string) {
if (this.dirConfig.rootPath.indexOf('dc=') === -1) {
return pathPrefix;
}
if (this.dirConfig.rootPath != null && this.dirConfig.rootPath.trim() !== '') {
const trimmedRootPath = this.dirConfig.rootPath.trim().toLowerCase();
let path = trimmedRootPath.substr(trimmedRootPath.indexOf('dc='));