LGTM-Alert Polynomial regular expression used on uncontrolled data
Uzlopak opened this issue · 8 comments
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
I dont have a laptop the next 4 days, so if you want to wait that long, i could try. But i am not quite sure why you call match on not test.
I assume that you can fix it by doing, as the s-flag means that dot also matches newline
/\/\/(?:.)*:(?:\/|\?|#|$)/s
Or why do you need the non matching groups anyway,
Maybe the original writer of that regex can give more insights?
I'll try to investigate
This is relative to an old IE fix. I think we can drop the whole statement IMO
Let's do it.
This is relative to an old IE fix. I think we can drop the whole statement IMO
Got a link or some additional info on that @zekth? Just curious as to what it was fixing (I still have to support IE forever unfortunately).
I think this is related to this behavior https://stackoverflow.com/questions/28857067/regex-not-working-for-ie-but-works-for-other-browsers