Skip to content

Commit

Permalink
fix: limit atom length to avoid exponential backtracking
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed Nov 22, 2023
1 parent 9e3a7bb commit 4f87faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/regexes/mix.regexes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
* RegEx to parse the project name from mix.exs content
*/
const mixProjectNameRegex = RegExp(
/(?<=\bdef project\b)(?:(?!\bend\b).)+?app:\s*:([A-Za-z0-9_@]+)+?.+?(?=end)/,
/(?<=\bdef project\b)(?:(?!\bend\b).)+?app:\s*:([A-Za-z0-9_@]{1,255})+?.+?(?=end)/,
"s",
);

Expand Down

0 comments on commit 4f87faf

Please sign in to comment.