http://www.foo.bar./
http://10.1.1.1
http://10.1.1.254
http://10.1.1.0
http://10.1.1.255
The top one is just a fully qualified domain name, and the rest could be valid host addresses depending on your subnet size. http://www.foo.bar./
http://10.1.1.1
http://10.1.1.254
http://10.1.1.0
http://10.1.1.255
The top one is just a fully qualified domain name, and the rest could be valid host addresses depending on your subnet size.This shouldn't fail. It resolves to an IP owned by The Coca Cola Corp (not an internal IP)
It should also start with a 0 to be "correct". Which in this case "correct" means the libc inet_aton() function will accept it and convert it to an ip address. The octal portion is nonstandard technically for uri's and is more an artifact of the libc the software you're using is sitting on.
Regardless, there are valid dotless decimal, octal, and hex representations for every IP address. Library support is variable.
It's valid, but the only people who ever use dword IP addresses are pentesters and their less scrupulous analogues. I have no issue disapppointing them.
There are valid dotless (and dotted) octal and hex representations too. They should also fail, I think.
I also don’t want to allow every possible technically
valid URL — quite the opposite.
And dword and octal IP URLs are definitely in the realm of technically valid but practically not.