shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stock (JIRA)" <>
Subject [jira] [Created] (SHIRO-553) Parsing od roles filter on urls incorrect
Date Tue, 29 Dec 2015 16:06:49 GMT
Stock created SHIRO-553:

             Summary: Parsing od roles filter on urls incorrect
                 Key: SHIRO-553
             Project: Shiro
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 1.2.4
         Environment: Web application where shiro should authorize a specific URL formore
than 1 role
            Reporter: Stock

My SHIRO.INI on URLS section:

/rest/test/** = authcBasic, roles[admin,normal]

Unfortuntely Shiro can't read correctly the array of roles.

I think the bug is in StringUtils class int the method: 
public static String[] split(String aLine, char delimiter, char beginQuoteChar, char endQuoteChar,
boolean retainQuotes, boolean trimTokens)

At line 392 there is an IF stament:

 } else if (c == delimiter && !inQuotes) {

I believe that the NOT in Quotes is wrong because it should read the token if it is inQuote.

Furthermore this method seems to be called with the argument "retainQuotes" set to TRUE. I
thing, for RolesFilter should be called with FALSE

This message was sent by Atlassian JIRA

View raw message