Skip to content

Commit

Permalink
catch user input for reverse routing searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Haehnchen committed Apr 20, 2024
1 parent 8f477c6 commit 91c0892
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,14 @@ private static boolean isReverseRoutePatternMatch(@NotNull Route route, @NotNull
String substring = match.substring(0, i);

String regex = substring.replace(string, "[\\w-]+");
Matcher matcher = Pattern.compile(regex).matcher(searchPath);
if (matcher.matches()) {
return true;

// user input
try {
Matcher matcher = Pattern.compile(regex).matcher(searchPath);
if (matcher.matches()) {
return true;
}
} catch (Exception ignored) {
}
}

Expand Down

0 comments on commit 91c0892

Please sign in to comment.