[KEYCLOAK-6623] - Policy enforcer gets confused with similar paths ending with wildcards

This commit is contained in:
pedroigor 2018-02-15 15:58:29 -02:00
parent 190771ddf1
commit 668b67dcdb

View file

@ -95,7 +95,9 @@ class PathMatcher {
}
if (WILDCARD == expectedUri.charAt(expectedUri.length() - 1)) {
matchingAnyPath = entry;
if (matchingAnyPath == null || matchingAnyPath.getPath().length() < matchingUri.length()) {
matchingAnyPath = entry;
}
} else {
int suffixIndex = expectedUri.indexOf(WILDCARD + ".");