You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is true, that l or 13 are not common hostnames, but they are valid though.
In a (W)LAN, I could have my hosts named as a, b, c, ... or even 1, 2, 3, ... etc. It's not a clever naming scheme (and not recommended) but definitely legal. So a GET http://13:8080 from host c to host 13 is quite valid indeed.
Currently URL validation accepts all of these parameters:
Activity
nandgator commentedon Oct 25, 2023
Hi @23pointsNorth, please refer #285 (comment)
23pointsNorth commentedon Oct 25, 2023
Right, thanks for pointing it out. I remember the documentation noted that it was introduced as of 0.11.x as a new feature.
A problem with the suggested solution is that
simple_host=Truealso allows forwhich is not a valid "
default" hostname. So in essence, we still need to regexlocalhostin the target URL?nandgator commentedon Oct 26, 2023
It is true, that
lor13are not common hostnames, but they are valid though.In a (W)LAN, I could have my hosts named as
a,b,c, ... or even1,2,3, ... etc. It's not a clever naming scheme (and not recommended) but definitely legal. So aGET http://13:8080from hostcto host13is quite valid indeed.Currently URL validation accepts all of these parameters:
It is possible to add another boolean parameter say
only_localhost, but I think it might not be good for the following reasons:simple_hostmust beTrueforonly_localhostto work. - complexityonly_localhostrefer to literallocalhoststring or all hostnames defined in/etc/hosts? - confusionabc,xyz, etc. are very uncommon. - viabilityInstead, if an user want to ensure that an URL is strictly
localhost, one could:23pointsNorth commentedon Oct 31, 2023
Thanks, I understand the perspective, just assumed some stability of the API.
Happy for you to close the issues as resolved.
nandgator commentedon Oct 31, 2023
Thanks for using
validators. Feel free to ping this thread if any ideas pop up.