Skip to content

Commit

Permalink
fix: property append relative search base to the dn
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Jul 29, 2024
1 parent 71230e0 commit e7b77a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/CommonLib/LdapUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,13 @@ private bool CreateSearchRequest(LdapQueryParameters queryParameters,
};

connectionWrapper.SaveContext(queryParameters.NamingContext, basePath);

if (!string.IsNullOrWhiteSpace(queryParameters.RelativeSearchBase)) {
basePath = $"{queryParameters.RelativeSearchBase},{basePath}";
}
}

if (string.IsNullOrWhiteSpace(queryParameters.SearchBase) && !string.IsNullOrWhiteSpace(queryParameters.RelativeSearchBase)) {
basePath = $"{queryParameters.RelativeSearchBase},{basePath}";
}

_log.LogInformation(basePath);

searchRequest = new SearchRequest(basePath, queryParameters.LDAPFilter, queryParameters.SearchScope,
queryParameters.Attributes);
Expand Down

0 comments on commit e7b77a0

Please sign in to comment.