Commit 17bec4a
authored
fix(api): fix inefficient RegExp that may cause ReDoS
Fixes inefficient RegExp which could cause Regular expression Denial of Service attack
The problematic part (?:\[(?:\d*|[a-z0-9_-]+)\])* will matches
(empty)
[]
[0123]
[abcd]
[0a_1b_c2]
[][]
[0123][]
[abcd][0a_1b_c2]
All these pattern is covered with the fixed regexp, I think.1 parent 04f70a7 commit 17bec4a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | | - | |
| 1211 | + | |
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
| |||
0 commit comments