-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URI.withinString finds invalid hostnames #352
Comments
Hostnames are validated since v1.18.11. What is the actual input you're dealing with? |
That would be a string like |
So you'd like to parse the matched string ("slice") before handing it to the callback? Do you want to send a PR for that? |
We are already parsing the matched string to fix some url matching with known schemas, and the recent validation change basically breaks this. I am not that interested in figuring out how I would validate it to send a PR as I don't see a tryParse mechanism somewhere. Easiest fix I can do is just wrap |
which are?
a) that's basically what I would have done |
except it does and that's the entire problem here. It's finding an url with invalid hostname which fails in |
As the hostname validation caused some kerfuffle I've decided to make this feature opt-in, thereby returning to the previous default behavior of v1.18.10. As of v1.19.0 you can activate hostname validation globally by setting I'm sorry for the confusion, inconvenience caused by the original change and the delayed rectification. |
Thank you @rodneyrehm! ❤️ |
This appears to be a new issue in one of the latest versions.
We have code like this:
and now it throws
Hostname "-oProxyCommand=whois" contains characters other than [A-Z0-9.-:_]
onURI(url)
line, which did not happen before.The text was updated successfully, but these errors were encountered: