Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security Fix for Regular Expression Denial of Service (ReDoS) - huntr…
….dev (#8) * Added two dangerous URLs to the fixtures array. * WIP: ReDoS mitigation - Fixed catastrophic backtracking that was happening at the check for a basic auth sequence, i.e. http://username:pass@example.com, but there is another happening at the domain var at line 11. * WIP: ReDoS mitigation - current state of my update fixes the vuln, but breaks 4 tests. * Added opt for punycode validation. Also made some minor regex tweaks. Passing all of notmatch and only failing 2 of urlmatch. * Added punycode url fixtures. * Simplified regex since case is always ignored. * Abandoned my fix and implemented RE2 to replace the built-in regex engine. * Removed the punycode validation I added because one of the operators does not work with RE2. Co-authored-by: Ben <beale.ben@gmail.com> Co-authored-by: Jamie Slome <55323451+JamieSlome@users.noreply.github.com>
- Loading branch information