Skip to content

Commit 3ffd0c0

Browse files
committed
Updated the regex to prevent regex exploitation with strings starting with lot of ((
1 parent f1ecc6d commit 3ffd0c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/logger/src/formatter/LogFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ abstract class LogFormatter {
162162
}
163163

164164
const stackLines = stack.split('\n');
165-
const regex = /\(([^)]*?):(\d+?):(\d+?)\)\\?$/;
165+
const regex = /\(([^())]*?):(\d+?):(\d+?)\)\\?$/;
166166

167167
for (const item of stackLines) {
168168
const match = regex.exec(item);

0 commit comments

Comments
 (0)