beaugunderson/ip-address

Vulnerable to octal input data

ortexx opened this issue · 1 comments

My library based on yours and I got this issue

So, parse and correctForm functions work only with decimal notation. If we pass '010.1.1.1', we get '10.1.1.1', not '8.1.1.1' as expected.

If we assume to work only with decimal numbers, then '010.1.1.1' should throw an error as an invalid value, otherwise we have to handle it some way(convert to decimal, for example).

can confirm. See #142 for more examples.