shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Demers (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SHIRO-562) WildcardPermission calls String.trim() twice in setParts()
Date Mon, 21 Mar 2016 18:46:25 GMT

     [ https://issues.apache.org/jira/browse/SHIRO-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brian Demers resolved SHIRO-562.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.5
                   2.0.0

cherry-picked from above repo (squashed 2 commits) 

> WildcardPermission calls String.trim() twice in setParts()
> ----------------------------------------------------------
>
>                 Key: SHIRO-562
>                 URL: https://issues.apache.org/jira/browse/SHIRO-562
>             Project: Shiro
>          Issue Type: Improvement
>          Components: Authorization (access control) 
>    Affects Versions: 1.2.4
>         Environment: any
>            Reporter: Matt Bishop
>            Priority: Trivial
>             Fix For: 2.0.0, 1.2.5
>
>
> WildcardPermission.setParts does this: 
> {quote}
>  if (wildcardString == null || wildcardString.trim().length() == 0) {
>             throw new IllegalArgumentException("Wildcard string cannot be null or empty.
Make sure permission strings are properly formatted.");
>         }
>         wildcardString = wildcardString.trim();
> {quote}
> Given the frequency of the use of this method it would be better to capture the first
trim().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message