You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit d15adf0 broken DirectorySynchronization in DirectorySearch by following change in DirectorySearch.cs:
/// FROM
SearchResultCollection result = new SearchResultCollection(clonedRoot, resultsHandle, properties, this);
searchResult = result; /// !!!REMOVED!!!
return result;
/// TO
return new SearchResultCollection(clonedRoot, resultsHandle, properties, this);
searchResult is not cached now and because of that the directory synchronization cookie is not updated.
Reproduction Steps
var ds = new DirectorySearcher("LDAP://srv-dc/dc=domain,dc=local");
ds.Filter = "(|(&(objectCategory=person)(objectClass=user))(&(objectClass=group)(!(groupType:1.2.840.113556.1.4.803:=2147483648)))(isDeleted=*))";
ds.DirectorySynchronization = new DirectorySynchronization();
ds.Tombstone = true;
ds.PropertiesToLoad.Add("objectGUID");
ds.PropertiesToLoad.Add("isDeleted");
ds.PropertiesToLoad.Add("objectClass");
ds.PropertiesToLoad.Add("member");
ds.PropertiesToLoad.Add("mail");
ds.PropertiesToLoad.Add("name");
var res1 = ds.FindAll();
var res2 = ds.FindAll();
Activity
[-]Broken DirectorySearch[/-][+]Broken DirectorySearch DirectorySynchronization[/+]marek-safar commentedon Dec 1, 2022
/cc @stephentoub
stephentoub commentedon Dec 1, 2022
Ugh. This is why naming conventions matter.