You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Peter Ledbrook (JIRA)" <ji...@apache.org> on 2010/10/24 15:50:19 UTC
[jira] Created: (SHIRO-205) Filter configs cannot contain commas in
INI format
Filter configs cannot contain commas in INI format
--------------------------------------------------
Key: SHIRO-205
URL: https://issues.apache.org/jira/browse/SHIRO-205
Project: Shiro
Issue Type: Bug
Components: Configuration
Affects Versions: 1.0.0
Reporter: Peter Ledbrook
Assignee: Peter Ledbrook
Fix For: 1.1.0
Consider this configuration:
[urls]
/test/** = roles[guest, admin]
The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Created: (SHIRO-205) Filter configs cannot contain commas
in INI format
Posted by Peter Ledbrook <pe...@cacoethes.co.uk>.
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Peter Ledbrook
> Fix For: 1.1.0
>
>
> Consider this configuration:
>
> [urls]
> /test/** = roles[guest, admin]
>
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
My proposed fix involves specifying '[' as the starting quote and ']'
as the end quote when using Shiro's split() method. One side-effect of
this approach is that " is no longer considered a quote character. Is
that OK? Do quote characters have any special meaning in filter chain
definitions?
Thanks,
Peter
[jira] Updated: (SHIRO-205) Filter configs cannot contain commas in
INI format
Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kalle Korhonen updated SHIRO-205:
---------------------------------
Fix Version/s: (was: 1.1.0)
1.2.0
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Peter Ledbrook
> Fix For: 1.2.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Assigned] (SHIRO-205) Filter configs cannot contain commas
in INI format
Posted by "Les Hazlewood (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Les Hazlewood reassigned SHIRO-205:
-----------------------------------
Assignee: Les Hazlewood (was: Peter Ledbrook)
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Les Hazlewood
> Fix For: 1.2.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SHIRO-205) Filter configs cannot contain commas
in INI format
Posted by "Peter Ledbrook (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925010#action_12925010 ]
Peter Ledbrook commented on SHIRO-205:
--------------------------------------
That probably does work, but I didn't know whether double-quotes was the appropriate solution or not. If it is, then I'll revert my local change because it breaks the quoting. Seems odd to require quotes (from a user perspective) since you already have the '[' and ']' delimiters.
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Peter Ledbrook
> Fix For: 1.1.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SHIRO-205) Filter configs cannot contain commas
in INI format
Posted by "Les Hazlewood (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924668#action_12924668 ]
Les Hazlewood commented on SHIRO-205:
-------------------------------------
Hi Peter,
I think that's a valid solution. But I'm amazed it didn't work already by using quotes inside the brackets. I thought that was documented in http://shiro.apache.org/web.html that you had to quote commas, but it doesn't look like it.
Can you try:
[urls]
/test/** = roles["guest, admin"]
and see if that works?
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Peter Ledbrook
> Fix For: 1.1.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Resolved] (SHIRO-205) Filter configs cannot contain commas
in INI format
Posted by "Les Hazlewood (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Les Hazlewood resolved SHIRO-205.
---------------------------------
Resolution: Fixed
Bracketed config no no longer needs to be quoted. For example, the following filter chain definition lines are equivalent:
foo, bar["a, b"], baz["d, e, f"]
and
foo, bar[a, b], baz[d, e, f]
The first line (old style) still works for backwards compatibility but the latter functions as expected now.
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Les Hazlewood
> Fix For: 1.2.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (SHIRO-205) Filter configs cannot contain commas in
INI format
Posted by "Les Hazlewood (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Les Hazlewood closed SHIRO-205.
-------------------------------
Closing with the 1.2.0 release.
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Les Hazlewood
> Fix For: 1.2.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SHIRO-205) Filter configs cannot contain commas
in INI format
Posted by "Peter Ledbrook (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHIRO-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924316#action_12924316 ]
Peter Ledbrook commented on SHIRO-205:
--------------------------------------
My proposed fix involves specifying '[' as the starting quote and ']'
as the end quote when using Shiro's split() method. One side-effect of
this approach is that " is no longer considered a quote character. Is
that OK? Do quote characters have any special meaning in filter chain
definitions?
Thanks,
Peter
> Filter configs cannot contain commas in INI format
> --------------------------------------------------
>
> Key: SHIRO-205
> URL: https://issues.apache.org/jira/browse/SHIRO-205
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.0.0
> Reporter: Peter Ledbrook
> Assignee: Peter Ledbrook
> Fix For: 1.1.0
>
>
> Consider this configuration:
> [urls]
> /test/** = roles[guest, admin]
> The above won't work at the moment because PathMatchingFilter splits the right-hand value into 'roles[guest' and 'admin]'. Commas inside square brackets should be ignored when splitting the path value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.