0
Fixed

Illegal DN Template of CN=Surname,FirstName,DC=organization not validated

Tony Sheehy 11 years ago updated by anonymous 8 years ago 2

The validation message for the illegal DN template of:

CN=Surname,FirstName,DC=organization

Is not descriptive of the problem, namely:

System.Core:
System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Unify.Product.IdentityBroker.TemplateDistinguishedNameCompiler`2.ComponentGenerate(TemplateDistinguishedNameComponent component)
at Unify.Product.IdentityBroker.TemplateDistinguishedNameCompiler`2.CreateComponent(IList`1 factoryInformation)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Framework.IO.DistinguishedName.GetStringValue()
at Unify.Product.IdentityBroker.Repository.EntityDistinguishedNameMultiValueDataUtility`1.ConvertValueToString(DistinguishedNameValue value)
at Unify.Product.IdentityBroker.Repository.StringBasedMultiValueDataUtilityBase`3.GetEntityValue(__EntityValueInsertRow entityValue, TBaseValue baseValue)
at Unify.Product.IdentityBroker.Repository.EntityMultiValueDataUtilityBase`3.<>c__DisplayClass1.<CreateEntityValue>b__0(TBaseValue baseValue, Int32 index)
at System.Linq.Enumerable.<SelectIterator>d__7`2.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Product.IdentityBroker.Repository.KnownEntityContextBase`4.InsertItems(HashSet`1 addedItems, EntityDataContext sourceContext, SqlConnection connection)
at Unify.Framework.Data.LinqContextConversionBase`4.SubmitChanges()
at Unify.Product.IdentityBroker.Adapter.<>c__DisplayClassf6.<ReflectPage>b__f3()
at Unify.Framework.ParallelGate.ParallelGateJob.RunBase()
at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)

Reassigned for confirmation of completion. Fix was applied to the TemplateDistinguishedNameParser. If the Value section of the Component is null, then an escaping issue of some kind has occurred; The value must always have something in it.

whether it's:

CN=@SpecialCharacter
or
CN=[field]
or
CN=ConstantValue
or
[relativeDn]

The template value is written to the value part of the component. If that hasn't happened, then there's been a formatting issue.

Confirmed or migrated to VSO.