We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Affects: 6.0.9
The tests below are successful:
assertThat(pathMatcher.match("bla/test/*", "bla/test/")).isTrue(); assertThat(pathMatcher.match("**/test/", "bla/test/")).isTrue();
then the following test should be successful too but fails:
assertThat(pathMatcher.match("**/test/*", "bla/test/")).isTrue();
The issue is located in https://github.com/spring-projects/spring-framework/blob/e5ee369e70e0a8ca04437f502649b11171a1c741/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java#LL278C1-L281C1
A possible fix:
if (pattIdxEnd == (pattDirs.length - 1)) { if (pattDirs[pattIdxEnd].equals("*") && path.endsWith(pathSeparator)) { pattIdxEnd--; continue; } if (pattern.endsWith(this.pathSeparator) != path.endsWith(this.pathSeparator)) { return false; } }
The text was updated successfully, but these errors were encountered:
This is by design. A a single * matches only the current segment. The trailing slash is the root of the next segment.
*
Sorry, something went wrong.
No branches or pull requests
Affects: 6.0.9
The tests below are successful:
then the following test should be successful too but fails:
The issue is located in https://github.com/spring-projects/spring-framework/blob/e5ee369e70e0a8ca04437f502649b11171a1c741/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java#LL278C1-L281C1
A possible fix:
The text was updated successfully, but these errors were encountered: