From e99c7aa15bcc779af0697268bf468b799fafa209 Mon Sep 17 00:00:00 2001 From: ready-research <72916209+ready-research@users.noreply.github.com> Date: Tue, 28 Sep 2021 19:27:46 +0530 Subject: [PATCH] [Security] Fix ReDoS Fix ReDoS --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 28c8b43e..69c2dcd1 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -143,7 +143,7 @@ function push_uniq(array, el) { } function string_template(text, props) { - return text.replace(/\{([^}]+)\}/g, function(str, p) { + return text.replace(/\{([^{}]+)\}/g, function(str, p) { var value = props[p]; return value instanceof AST_Node ? value.print_to_string() : value; });