lsc
lsc copied to clipboard
The SyncReplSourceService.convertSearchEntries() method returns a Map which keys may not be searchable
When calling the SyncReplSourceService.convertSearchEntries() method, we will get back a Map which keys are the Stringh form of a DN.
The problem is that it's built using the entry.getDn().getName() method, which returns the user provided DN form as a String.
That means that if the stored DN is for instance dc=EXAMPLE,dc=com, looking into the map for dc=example,dc=com will not find the associated values.
We must either store the key as a Dn instance, and leverage its equals() method, or use the Dn.getNormName() method to have the normalized form (but that requires searching with a normalized form too).
See also https://github.com/lsc-project/lsc/issues/54