Skip to content

Commit

Permalink
Revert "[bugfix] Fix redos in preprocessRFC2822 regex (#6015)"
Browse files Browse the repository at this point in the history
This reverts commit 7aebb16.
  • Loading branch information
ichernev committed Jul 6, 2022
1 parent 7aebb16 commit b4e6153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/create/from-string.js
Expand Up @@ -151,7 +151,7 @@ function untruncateYear(yearStr) {
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/\([^)]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
Expand Down

0 comments on commit b4e6153

Please sign in to comment.