From 0517da24056d081a10cac363ccb4354035ce2513 Mon Sep 17 00:00:00 2001 From: npt-1707 Date: Mon, 18 May 2026 06:17:10 +0800 Subject: [PATCH] front/lib/moment/moment.js: fix redos using local backtracking regex --- front/lib/moment/moment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/lib/moment/moment.js b/front/lib/moment/moment.js index 1b129716..b5c59233 100755 --- a/front/lib/moment/moment.js +++ b/front/lib/moment/moment.js @@ -2294,7 +2294,7 @@ function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + return s.replace(/\((?:(?!\().)*\)|[\n\t]/gs, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) {