[
https://issues.apache.org/jira/browse/SHIRO-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15306037#comment-15306037
]
ASF GitHub Bot commented on SHIRO-564:
--------------------------------------
GitHub user mattbishop opened a pull request:
https://github.com/apache/shiro/pull/18
SHIRO-564 more efficient case-insensitive wildcard strings
WildcartPermission will create the subparts list twice when it should
consider permissions case-insensitively.
https://issues.apache.org/jira/browse/SHIRO-564
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mattbishop/shiro SHIRO-564
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/shiro/pull/18.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18
----
commit b7172f12ca385612df639caec852c93cbf0738df
Author: Matt Bishop <[email protected]>
Date: 2016-05-29T19:12:31Z
SHIRO-564 lower-case wildcard string before building subparts so that the
subparts list is not created twice for case-insensitive strings.
----
> WildcardPermission case-insensitive makes parts collections twice
> -----------------------------------------------------------------
>
> Key: SHIRO-564
> URL: https://issues.apache.org/jira/browse/SHIRO-564
> Project: Shiro
> Issue Type: Improvement
> Components: Authorization (access control)
> Affects Versions: 1.2.4
> Environment: Any
> Reporter: Matt Bishop
> Priority: Trivial
>
> WildcardPermissions have a caseSensitive flag that instructs the permission
> to ignore case when comparing permissions. It's implementation of this
> feature is kinda wasteful because it first parses the permission string into
> a Set<String> part, THEN checks the flag and then rebuilds the part Set.
> It might be faster to check the flag first, lowercase the permission string,
> then parse the parts. This would save creating a whole bunch of extra
> LinkedHashSets.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)