From 43ee7e711b2a3da48dbdff84a52cc413ec2cc159 Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Wed, 8 May 2024 10:37:22 +0200 Subject: [PATCH 1/2] fix(security): fix polynomial regular expression --- src/execute/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/execute/index.js b/src/execute/index.js index f92024c0f..b0ae30f98 100755 --- a/src/execute/index.js +++ b/src/execute/index.js @@ -388,7 +388,7 @@ function buildOas3UrlWithContext(ourUrl = '', contextUrl = '') { function getVariableTemplateNames(str) { const results = []; - const re = /{([^}]+)}/g; + const re = /{([\s\S]+?)}/g; let text; // eslint-disable-next-line no-cond-assign From ee04cb29917d92bfdce564020fca40de3ed6e9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Gorej?= Date: Wed, 8 May 2024 16:35:17 +0200 Subject: [PATCH 2/2] Update src/execute/index.js --- src/execute/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/execute/index.js b/src/execute/index.js index b0ae30f98..63931995d 100755 --- a/src/execute/index.js +++ b/src/execute/index.js @@ -388,7 +388,7 @@ function buildOas3UrlWithContext(ourUrl = '', contextUrl = '') { function getVariableTemplateNames(str) { const results = []; - const re = /{([\s\S]+?)}/g; + const re = /{([^}]{1,29})}/g; let text; // eslint-disable-next-line no-cond-assign