Skip to content

Commit

Permalink
Escape regex query criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
criminosis committed Dec 1, 2023
1 parent d55e2df commit b093196
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,9 @@ public String buildQueryFilterStringValue(String key, String value, JanusGraphPr
} else if (predicate == Text.CONTAINS_PREFIX) {
return (key + ":" + escapeValue(value) + "*");
} else if (predicate == Text.REGEX) {
return (stringKey + ":/" + value + "/");
return (stringKey + ":/" + escapeValue(value) + "/");
} else if (predicate == Text.CONTAINS_REGEX) {
return (key + ":/" + value + "/");
return (key + ":/" + escapeValue(value) + "/");
} else if (predicate == Cmp.EQUAL) {
return (stringKey + ":\"" + escapeValue(value) + "\"");
} else if (predicate == Cmp.NOT_EQUAL) {
Expand Down

0 comments on commit b093196

Please sign in to comment.