Merge pull request #1646 from npt-1707/fix_CVE-2023-22467

Fix potentially vulnerable cloned function
This commit is contained in:
Jokob @NetAlertX authored and GitHub committed 2026-05-18 12:16:43 +10:00
commit f0684c66c2
1 file changed
+1 -1
+1 -1
View File
@@ -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) {