4 ms·
> http://3628126748 http://3628126748 This shouldn't fail. It resolves to an IP owned by The Coca Cola Corp (not an internal IP)
by gburt 11y ago
> http://3628126748 http://3628126748
This shouldn't fail. It resolves to an IP owned by The Coca Cola Corp (not an internal IP)
- chimeracoder 11y agoI'm confused by how that works. I've never seen IP addresses expressed in decimal form before (which is what I'm assuming that is).
- odonnellryan 11y agoAn IP address is just a number. Here's a great post on it: http://superuser.com/a/486936 http://superuser.com/a/486936
- mitchty 11y agoIt is in octal actually, and it isn't overly portable. 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.
- quesera 11y agoThat looks like decimal to me. I didn't convert it to test, but I see a couple 8s. :) Regardless, there are valid dotless decimal, octal, and hex representations for every IP address. Library support is variable.
- quesera 11y agoI'd argue that it should fail, for any hostname/address validation other than an academic exercise. 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.
- nightcracker 11y agoIt's valid, therefore it should be marked as such by the regex.
- function_seven 11y agoNot so. From TFA: 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.