Skip to content

ipv4 format checker is too lenient #149

@exarkun

Description

@exarkun

According to http://json-schema.org/latest/json-schema-validation.html#anchor117 the ipv4 format is an IPv4 address according to the "dotted-quad" ABNF syntax as defined in RFC 2673, section 3.2 [RFC2673].

The "dotted-quad" ABNF syntax referenced is:

dotted-quad      =  decbyte "." decbyte "." decbyte "." decbyte
decbyte          =  1*3DIGIT

The draft4_format_checker incorrectly allows the following values which do not conform to this syntax:

  • 127.0
  • 0x7f000001
  • 2130706433
  • 017700000001

Presumably according to the whims of the platform inet_aton implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions