[ 
https://issues.apache.org/jira/browse/SHIRO-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071980#comment-14071980
 ] 

José Pereira commented on SHIRO-442:
------------------------------------

We were going to suggest the same patch! Is thre a possibility to create a 
release 1.2.3a or similar (that is what we are currently doing ourselves 
because this patch is critical to us!)

Thank you very much

> CAS client fails with multi-valued SAML attributes
> --------------------------------------------------
>
>                 Key: SHIRO-442
>                 URL: https://issues.apache.org/jira/browse/SHIRO-442
>             Project: Shiro
>          Issue Type: Bug
>          Components: Authorization (access control) 
>    Affects Versions: 1.2.1
>            Reporter: Art O Cathain
>             Fix For: 1.2.3, 2.0.0
>
>         Attachments: shiro-cas-saml.patch
>
>
> When using org.apache.shiro.cas.CasRealm, if the SAML returned by CAS 
> contains multiple attributes of the same name (e.g. roles?), CasRealm blows 
> up in doGetAuthorizationInfo
> String value = attributes.get(attributeName);
>  with
> java.lang.ClassCastException: java.util.ArrayList cannot be cast to 
> java.lang.String
> This is because the org.jasig.cas.client.validation.Saml11TicketValidator is 
> populating the attributes in the
> principal as follows:
> personAttributes.put(samlAttribute.getName(), values.size() == 1 ? 
> values.get(0) : values);
> See attached patch for a fix



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to