alexcorvi / anchorme.js

Tiny, fast, efficient, feature rich Javascript library to detect links / URLs / Emails in text and convert them to clickable HTML anchor links
http://alexcorvi.github.io/anchorme.js/
MIT License
561 stars 64 forks source link

Catastrophic Backtracking #99

Open FreddyMcRay opened 4 years ago

FreddyMcRay commented 4 years ago

anchorme.validate.url() suffers from backtracking.

Steps to repro:

anchorme.validate.url("https://google.com?param=dfffffsdfsdfsdfasddddd(")

Expected result:

false

Actual result:

The line above never returns result.

FreddyMcRay commented 4 years ago

100