From 4cf3b9f2c139d714a48242333ecf5d6d62a7e7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AE=80=E9=9D=99=E5=87=A1?= Date: Sat, 11 May 2024 01:21:15 +0800 Subject: [PATCH] Fix code scanning alert - Polynomial regular expression used on uncontrolled data (#15) * Fix code scanning alert - Polynomial regular expression used on uncontrolled data #4 --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index ce4cc6d..6072f5c 100644 --- a/src/util.ts +++ b/src/util.ts @@ -140,7 +140,7 @@ export function processKeyValueGroups(str: string) { const results = []; lines.forEach(function (line) { - const matches = line.match(/([\w/]+):\s(.*)/); + const matches = line.match(/(\w+):\s(.*)/); if (matches === null) { return;