DN template broken on upgrade from v4.0 to v4.1

Adam van Vliet (Chief Information Security Officer) 7 years ago updated by anonymous 6 years ago 3

The DN templates are broken on upgrade from v4.0 to v4.1. For example:

          <dn xmlns="">
            <dnComponent name=<span class="code-quote">"Field"</span> id=<span class="code-quote">"28774c0e-011c-4241-a484-4bd58f9170bf"</span> attributeType=<span class="code-quote">"UID"</span> key=<span class="code-quote">"RecordId"</span> />
            <dnComponent name=<span class="code-quote">"Constant"</span> id=<span class="code-quote">"478f7ec4-c400-4b1e-b3db-cb5c676feca7"</span> attributeType=<span class="code-quote">"OU"</span> value=<span class="code-quote">"org"</span> />
            <dnComponent name=<span class="code-quote">"Constant"</span> id=<span class="code-quote">"226cbcd6-1d19-4ff4-97f1-e0aac0b80374"</span> attributeType=<span class="code-quote">"DC"</span> value=<span class="code-quote">"CHRIS21DEMODC"</span> />

This dn generator turns into UID=RecordId+DC=CHRIS21DEMODC (this is known due to a failed export), but then when edited is blank.

The upgrade should give a template of UID=RecordId,OU=org,DC=CHRIS21DEMODC and the UI should hopefully reflect this. It would be nice to have the new template saved back to the file, but not essential.

Affected Versions:
Fixed by Version:

Several times in the code the following:

TemplateDistinguishedName.FromXml(configuration.DistinguishedNameTemplate) ?? TemplateDistinguishedName.BackwardsCompatibleParse(configuration.DistinguishedNameTemplate);

was used to pull data from XML. In the file "Source/Service/Unify.IdentityBroker.Connect.Engine/AdapterToRemotingConfigurationValueAdapter.cs" on line 72 the FromXml was called without the null check for BackwardsCompatibleParse.

I added the missing code.

Confirm working using attached configuration