You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: add option for maximum nested extglobs with default depth of 2
Also find other risky globs and treat them as literals
* Update test/options.maxExtglobRecursion.js
Co-authored-by: Brian Woodward <brian.woodward@gmail.com>
* Fix bug for single character nested star-only extglobs
* Move constant to constants.js and set to 0 by default
---------
Co-authored-by: Brian Woodward <brian.woodward@gmail.com>
Copy file name to clipboardExpand all lines: .verb.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,7 @@ The following options may be used with the main `picomatch()` function or any of
106
106
|`literalBrackets`|`boolean`|`undefined`| When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
107
107
|`matchBase`|`boolean`|`false`| Alias for `basename`|
108
108
|`maxLength`|`number`|`65536`| Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
109
+
|`maxExtglobRecursion`|`number\|boolean`|`0`| Limit nested quantified extglobs and other risky repeated extglob forms. When the limit is exceeded, the extglob is treated as a literal string instead of being compiled to regex. Set to `false` to disable this safeguard. |
109
110
|`nobrace`|`boolean`|`false`| Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
110
111
|`nobracket`|`boolean`|`undefined`| Disable matching with regex brackets. |
111
112
|`nocase`|`boolean`|`false`| Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,6 +345,7 @@ The following options may be used with the main `picomatch()` function or any of
345
345
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
346
346
| `matchBase` | `boolean` | `false` | Alias for `basename` |
347
347
| `maxLength` | `number` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
348
+
| `maxExtglobRecursion` | `number\|boolean` | `0` | Limit nested quantified extglobs and other risky repeated extglob forms. When the limit is exceeded, the extglob is treated as a literal string instead of being compiled to regex. Set to `false` to disable this safeguard. |
348
349
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
0 commit comments