Skip to content

Commit 47e0e45

Browse files
committed
Credit @yetingli for the regexp improvement
1 parent 707e1b2 commit 47e0e45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

minimatch.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ function braceExpand (pattern, options) {
264264

265265
assertValidPattern(pattern)
266266

267+
// Thanks to Yeting Li <https://github.com/yetingli> for
268+
// improving this regexp to avoid a ReDOS vulnerability.
267269
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
268270
// shortcut. no need to expand.
269271
return [pattern]

0 commit comments

Comments
 (0)