commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Kusnierz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (VALIDATOR-421) InetAddressValidator IPV4 rejects IPs with leading 0's in octets
Date Wed, 05 Apr 2017 16:13:41 GMT

    [ https://issues.apache.org/jira/browse/VALIDATOR-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957126#comment-15957126
] 

Matt Kusnierz commented on VALIDATOR-421:
-----------------------------------------

https://en.wikipedia.org/wiki/Dot-decimal_notation

> InetAddressValidator IPV4 rejects IPs with leading 0's in octets
> ----------------------------------------------------------------
>
>                 Key: VALIDATOR-421
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-421
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.6
>            Reporter: Matt Kusnierz
>
> According to Wikipedia "It [IPv4] also allowed the numbers to be written in hexadecimal
and octal, by prefixing them with 0x and 0, respectively", but org.apache.commons.validator.routines.InetAddressValidator.isValidInet4Address(String)
rejects IPs if an ipSegment starts with a leading 0.
> So leading 0's should be detected first, and then used to try and partInt using the octal
radix.
> The ipv4 regex also doesn't support hex notation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message