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
Describe the bug 01.02.08.09 is considered to be valid IPv4 address by the checks added in #2262. This can be problematic if anyone is to use this IP (got from NNS contract) as an input for BSD or POSIX compliant inet_aton() and inet_addr() functions which will interpret chunks with leading zeros as octal values rather than decimal (and some other libraries can still interpret them as decimal).
Expected behavior
We better forbid leading zeros.
The text was updated successfully, but these errors were encountered:
But this notation is forbidden by IPAddress.TryParse() (somewhat surprisingly), so 01.02.08.09 is not actually accepted in the end by the current NNS contract. Still, 00.00.00.00 is and it's very easy to miss these nuances, so we better still fix the regex.
Describe the bug
01.02.08.09
is considered to be valid IPv4 address by the checks added in #2262. This can be problematic if anyone is to use this IP (got from NNS contract) as an input for BSD or POSIX compliantinet_aton()
andinet_addr()
functions which will interpret chunks with leading zeros as octal values rather than decimal (and some other libraries can still interpret them as decimal).Expected behavior
We better forbid leading zeros.
The text was updated successfully, but these errors were encountered: