From f5b621610a74d800905550b21705a1036816ba05 Mon Sep 17 00:00:00 2001 From: Muntashir Al-Islam Date: Wed, 20 Nov 2024 22:16:59 -0800 Subject: [PATCH] [CWE-400] Escape user-provided regex pattern in Finder Signed-off-by: Muntashir Al-Islam --- .../muntashirakon/AppManager/filters/options/FilterOption.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/github/muntashirakon/AppManager/filters/options/FilterOption.java b/app/src/main/java/io/github/muntashirakon/AppManager/filters/options/FilterOption.java index d2e823ea120..86967584440 100644 --- a/app/src/main/java/io/github/muntashirakon/AppManager/filters/options/FilterOption.java +++ b/app/src/main/java/io/github/muntashirakon/AppManager/filters/options/FilterOption.java @@ -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"); }