From 4c654e4d1542f329ed561fd95ccd80f30c6872d6 Mon Sep 17 00:00:00 2001 From: Naitik Shah Date: Tue, 7 Sep 2021 10:41:06 +0400 Subject: [PATCH] fix potential dos in regex --- lib/tmpl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tmpl.js b/lib/tmpl.js index 8fed3a8..63ed9b2 100644 --- a/lib/tmpl.js +++ b/lib/tmpl.js @@ -1,4 +1,4 @@ -var INTERPOLATE = /{([\s\S]+?)}/g +var INTERPOLATE = /{([^{]+?)}/g module.exports = function(str, data) { var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +