attribute resolver issues after upgrade to v3

Cantor, Scott cantor.2 at osu.edu
Mon Aug 17 16:31:58 EDT 2015


On 8/17/15, 4:03 PM, "users on behalf of Robert A Basch" <users-bounces at shibboleth.net on behalf of rbasch at mit.edu> wrote:

>I turned on DEBUG logging on a V2 IdP, and it looks like the whitespace is
>indeed being trimmed from the filter somehow before vt-ldap is invoked.

How can you tell that? I don't see anywhere that's happening in the code.

>Also, in case it wasn't clear before, the whitespace is apparently only a
>problem in V3 when it is in the content of the Velocity #if ... directive
>in the template.

Yes, I understand the issue (I have whitespace collapsed in some Template attribute definitions that have #if constructs in them), but I'm not seeing how this would be getting stripped anywhere unless vt-ldap were doing the stripping. Trying to pin down exactly which layer's involved.

>As for the null values issue, note that our V2 code tested for *either*
>.isEmpty() or ! .get(0), e.g.:
>
>  #if (${attribute.isEmpty()} || ! ${attribute.get(0)})
>
>so presumably it was (only) the ! .get(0) that was satisfying the condition
>in the null value case.

Ah, right.

That construct can't be "fixed" since the ! is being evaluated by Velocity, and the object being returned now is definitely not null. I documented the difference in a couple of places.

-- Scott



More information about the users mailing list