Skip to content

Commit

Permalink
[CWE-400] Escape user-provided regex pattern in Finder
Browse files Browse the repository at this point in the history
Signed-off-by: Muntashir Al-Islam <muntashirakon@riseup.net>
  • Loading branch information
MuntashirAkon committed Nov 21, 2024
1 parent c23f310 commit f5b6216
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void setKeyValue(@NonNull String key, @Nullable String value) {
this.longValue = Long.parseLong(value);
break;
case TYPE_REGEX:
this.regexValue = Pattern.compile(value);
this.regexValue = Pattern.compile(Pattern.quote(value));
case TYPE_STR_MULTIPLE:
this.stringValues = value.split("\\n");
}
Expand Down

0 comments on commit f5b6216

Please sign in to comment.