Skip to content

Commit

Permalink
Merge pull request #373 from switcherapi/staging
Browse files Browse the repository at this point in the history
Fixed remaining reDoS vulnerabilities
  • Loading branch information
petruki authored Jan 30, 2023
2 parents b592d92 + 03df9a2 commit f5e4311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/config-strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ async function processREGEX(operation, input, values) {
case OperationsType.NOT_EXIST:
return !(await processREGEX(OperationsType.EXIST, input, values));
case OperationsType.EQUAL:
return input.match(`\\b${values[0]}\\b`) != null;
return await tryMatch([`\\b${values[0]}\\b`], input);
case OperationsType.NOT_EQUAL:
return input.match(`\\b${values[0]}\\b`) == null;
return !(await tryMatch([`\\b${values[0]}\\b`], input));
}
}

Expand Down

0 comments on commit f5e4311

Please sign in to comment.