If an entity metadata includes DisplayName elements within ScopedUIInfo elements, and these precede the DisplayName in the UIInfo element, discojson will produce JSON with the 1st scoped DisplayName element.
This will also happen with UI info elements other than DisplayName, e.g. Description.
Code Version
master (2.1.3)
Expected Behavior
The DisplayName in the UIInfo element should be picked
Current Behavior
The DisplayName in the 1st ScopedUIInfo element is picked
Possible Solution
Check ancestors of the DisplayName (and other UI info) elements
Steps to Reproduce
- Produce metadata for an entity including the XML structure below
- process it through PyFF to obtain discojson
- check the DisplayName
<md:IDPSSODescriptor [...]>
<md:Extensions>
<shibmd:Scope regexp="false">81098135.example.org</shibmd:Scope>
<oaf:ScopedUIInfo scope="81098135.example.org">
<mdui:DisplayName xml:lang="en">SCOPED</mdui:DisplayName>
</oaf:ScopedUIInfo>
<mdui:UIInfo>
<mdui:DisplayName xml:lang="en">NON SCOPED</mdui:DisplayName>
</mdui:UIInfo>
[...]
</md:Extensions>
[...]
</md:IDPSSODescriptor>
If an entity metadata includes
DisplayNameelements withinScopedUIInfoelements, and these precede theDisplayNamein theUIInfoelement, discojson will produce JSON with the 1st scopedDisplayNameelement.This will also happen with UI info elements other than
DisplayName, e.g.Description.Code Version
master (2.1.3)
Expected Behavior
The
DisplayNamein theUIInfoelement should be pickedCurrent Behavior
The
DisplayNamein the 1stScopedUIInfoelement is pickedPossible Solution
Check ancestors of the
DisplayName(and other UI info) elementsSteps to Reproduce