Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit d39e243

Browse files
committed
fix REDoS-Attack-vector
1 parent 5dcd474 commit d39e243

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@
591591
result = (result || '').replace(/^\s+|\s+$/g, '');
592592

593593
// Detect strings containing only the "use strict" directive.
594-
return /^(?:\/\*+[\w\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result)
594+
return /^(?:\/\*[\w\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result)
595595
? ''
596596
: result;
597597
}

0 commit comments

Comments
 (0)