comunica / validate-iri.js

Library to validate IRIs according to RFC 3987
MIT License
4 stars 2 forks source link

Strict validation hangs with a test case #19

Open prabhu opened 3 months ago

prabhu commented 3 months ago

We recently noticed that strict validation never completes for urls containing ${ with 3 or more levels in path. Below is an example:

https://github.com/apache/maven-resolver/tree/${project.scm.tag}

It works for below:

https://github.com/apache/${project.scm.tag}
# Takes over 30 seconds
https://github.com/apache/maven-resolver/${project.scm.tag}
rubensworks commented 2 months ago

The regex is probably running into some issues for that case. We should look into optimizing the regex. (Definitely open to PRs!)