Module talk:IPAddress: Difference between revisions

Content deleted Content added
Line 19:
 
Is '00000000000005.10.10.10' a correct IPv4 address? --[[User:DixonD|DixonD]] ([[User talk:DixonD|talk]]) 07:53, 8 March 2013 (UTC)
:good question. it's not so much about "more than 3 digits" as it's about leading zeroes: is 12.02.4.4 legal? how about 12.00.4.4? what are the rules?
:current code allows those, as well as 1.00000000100.2.2, i.e, any number can be preceded by any number of 0's. it's relatively easy to disallow. from [[Dot-decimal notation#Caveat]] it can be concluded that preceding with 0's is not a good idea, and can lead to confusion- this may be interpreted sometimes to mean "octal". should i change the code to disallow? should we add it to the tests? peace - [[User:קיפודנחש|קיפודנחש (aka kipod)]] ([[User talk:קיפודנחש|talk]]) 09:06, 8 March 2013 (UTC)