[ https://issues.apache.org/jira/browse/SHIRO-821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352094#comment-17352094 ]
Brian Demers commented on SHIRO-821: ------------------------------------ [~nidhikv], I'm not sure I understand. Your patterns end with a space character, but your URLs do not? > 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)