Skip to content

Commit

Permalink
Fix ReDoS
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Jul 19, 2024
1 parent e06e432 commit 0698642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/autoInject.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import auto from './auto.js'
import wrapAsync from './internal/wrapAsync.js'
import { isAsync } from './internal/wrapAsync.js'

var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;
var ARROW_FN_ARGS = /^(?:async\s+)?\s*\(?\s*([^)=]*)\s*\)?(?:\s*=>)/;
var FN_ARGS = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/;
var ARROW_FN_ARGS = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;

Expand Down

0 comments on commit 0698642

Please sign in to comment.