AttributeExtractor fails to deal with multiple Logos

Description

When having multiple MDUI Logos in metadata like:

<mdui:Logo height="16" width="16">....</mdui:Logo>
<mdui:Logo height="60" width="80">....</mdui:Logo>

And an an AttributeExtractor like:

<AttributeExtractor type="Metadata" errorURL="errorURL" DisplayName="displayName">
<Logo id="Large-Logo" height="60" width="80" formatter="&lt;img align='middle' src='$_string' height='$height' width='$width'/&gt;"/> -->
<Logo id="Small-Logo" height="16" width="16" formatter="&lt;img align='middle' src='$_string' height='$height' width='$width'/&gt;"/>
</AttributeExtractor>

I would expect two attributes containing the two logo URLs. But it seems that both attributes contain the same logo URL (16x16 pixel URL) in every case. Even if only the larger logo (80x60) shall be extracted, it is in fact the small logo (16x16) that is used for the attribute even though the larger logo has a smaller total size difference as described on: https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeExtractor#NativeSPAttributeExtractor-MetadataAttributeExtractorVersion25andAbove

PS: In Jira version 2.5.1 is not available yet as "released version" for bug reports

Environment

None

Activity

Show:

Scott Cantor June 18, 2013 at 2:24 AM

Closing on release.

Scott Cantor May 16, 2013 at 6:02 PM

http://svn.shibboleth.net/view/cpp-sp?rev=3848&view=rev

The absence of the lang tag was causing the bug, my tests had the language set.

Lukas Hämmerle May 16, 2013 at 8:46 AM

No language tags are involved. In metadata the two images look like:

<mdui:Logo height="16" width="16">data:image/png;base64,iVBORw...g==</mdui:Logo>
<mdui:Logo height="60" width="80">data:image/png;base64,iVBORw...mCC</mdui:Logo>

Scott Cantor May 15, 2013 at 8:49 PM

I just tested with your example data here, and I'm not getting what you got. The two logo attributes are populated with the two different logos as expected.

Are there any language tags involved? That can affect the matching process.

I don't think the size matching is what I would call "robust" at all, but in this basic case it seems to work for me.

Lukas Hämmerle December 20, 2012 at 9:29 AM

According to Peter Schober in their case always the larger logo is the only one available as attribute. It seems like only the first MDUI Logo is treated by the Attribut Extractor because in our case the smaller logo is always first in metadata, in their case the large logo is first.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Original estimate

Fix versions

Affects versions

Created December 20, 2012 at 7:44 AM
Updated June 18, 2013 at 2:24 AM
Resolved May 16, 2013 at 6:02 PM