[ 
https://issues.apache.org/jira/browse/SHIRO-821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352083#comment-17352083
 ] 

Srinidhi edited comment on SHIRO-821 at 5/26/21, 9:40 PM:
----------------------------------------------------------

Thanks [~bdemers]

We have some historical config data that has trailing spaces for some records. 
Until v1.7.0, the regex match was all working good. When we recently upgraded 
to v1.7.1, it broke that behavior.

Would this be available in v1.7.2? Can you also please share the PR for the fix?


was (Author: nidhikv):
Thanks [~bdemers]

We have some historical config data that has trailing spaces for some records. 
Until v1.7.0, the regex match was all working good. When we recently upgraded 
to v1.7.1, it broke that behavior.

Would this be available in v1.7.2? Can you also please share the PR for the 
correction?

> Difference in behaviour when matching regex patterns with trailing spaces 
> between shiro-core v1.7.0 and v1.7.1
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SHIRO-821
>                 URL: https://issues.apache.org/jira/browse/SHIRO-821
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Srinidhi
>            Priority: Major
>
> Hi,
>         Not sure if this is a bug but there appears to be a difference in the 
> way regex patterns with trailing spaces are matched in shiro-core. This 
> behavior seems to have changed between v1.7.0 and v1.7.1.
> Steps to replicate:
> RegexTest.java:
> {code:java}
> import org.apache.shiro.util.AntPathMatcher;
> public class RegexTest {
>   public static void main(String[] args)
>   {
>     AntPathMatcher matcher = new AntPathMatcher();
>     System.out.println("Matching ====" + "/a/b/* " + "==== with ====" + 
> "/a/b/c" + "====");
>     System.out.println("RESULT: " + matcher.match("/a/b/* ", "/a/b/c"));
>   }
> }
> {code}
>  
>  
> Output with v1.7.0:
> $ java -cp "shiro-core-1.7.0.jar;." RegexTest
>  Matching ====/a/b/* ==== with ====/a/b/c====
>  RESULT: *true*
>  
> Output with v1.7.1:
> $ java -cp "shiro-core-1.7.1.jar;." RegexTest
>  Matching ====/a/b/* ==== with ====/a/b/c====
>  RESULT: *false*
>  
> Can you please let me know if this change was an intentional fix to an 
> existing bug or a new bug that got introduced?
> Is there any flag to retain the prior behavior?
>  
> -Thanks
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to