You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Erlend Oftedal (Created) (JIRA)" <ji...@apache.org> on 2012/01/05 10:59:39 UTC
[jira] [Created] (WW-3737) Parsing of excludePattern breaks regex
Parsing of excludePattern breaks regex
---------------------------------------
Key: WW-3737
URL: https://issues.apache.org/jira/browse/WW-3737
Project: Struts 2
Issue Type: Bug
Components: Dispatch Filter
Reporter: Erlend Oftedal
See buildExcludedPatternsList() in http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
It simply splits on commas, making it impossible to write regex like /products/[0-9]{1,10}.json as this will be split in two.
Please supply a way to escape commas by sticking a \ in front or something like that.
--
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] (WW-3737) Parsing of excludePattern breaks regex
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473106#comment-13473106 ]
Lukasz Lenart commented on WW-3737:
-----------------------------------
Someone could base on that behaviour that's why I postponed it till 2.5
> Parsing of excludePattern breaks regex
> ---------------------------------------
>
> Key: WW-3737
> URL: https://issues.apache.org/jira/browse/WW-3737
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Reporter: Erlend Oftedal
> Fix For: 2.5
>
>
> See buildExcludedPatternsList() in http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
> It simply splits on commas, making it impossible to write regex like /products/[0-9]{1,10}.json as this will be split in two.
> Please supply a way to escape commas by sticking a \ in front or something like that.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3737) Parsing of excludePattern breaks regex
Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473094#comment-13473094 ]
Martin Uhlir commented on WW-3737:
----------------------------------
Possible regex suggestions to split the strings:
1) At "," except cases where there is a preceding "\" right before ","
{noformat}
"(?<!\\\\),"
{noformat}
2) At "," except cases where "," is followed by decimal number(s) (or no decimal number at all) followed by "}"
{noformat}
",(?![0-9]*\\})"
{noformat}
Lukasz, what exactly is your concern?
> Parsing of excludePattern breaks regex
> ---------------------------------------
>
> Key: WW-3737
> URL: https://issues.apache.org/jira/browse/WW-3737
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Reporter: Erlend Oftedal
> Fix For: 2.5
>
>
> See buildExcludedPatternsList() in http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
> It simply splits on commas, making it impossible to write regex like /products/[0-9]{1,10}.json as this will be split in two.
> Please supply a way to escape commas by sticking a \ in front or something like that.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3737) Parsing of excludePattern breaks regex
Posted by "Lukasz Lenart (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3737:
------------------------------
Fix Version/s: 2.5
This change can break backward compatibility
> Parsing of excludePattern breaks regex
> ---------------------------------------
>
> Key: WW-3737
> URL: https://issues.apache.org/jira/browse/WW-3737
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Reporter: Erlend Oftedal
> Fix For: 2.5
>
>
> See buildExcludedPatternsList() in http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java
> It simply splits on commas, making it impossible to write regex like /products/[0-9]{1,10}.json as this will be split in two.
> Please supply a way to escape commas by sticking a \ in front or something like that.
--
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