Skip to content

Bugs: network formats (0.28.1) #36

Open

Description

@otsobide

Defects in the network-format value objects of 0.28.1 (security/ipv4.py, ipv6.py, mac_address.py, email_address.py, url.py; each one reproduced). Fixed by the new network.py family; every item gets a regression test and is ticked when the fix lands.

  • C25 Ipv4 accepts octets with leading zeros ('01.02.03.004', ambiguous octal notation), unlike the stdlib ipaddress.
  • C26 Ipv6 regex has false positives (malformed fe80 zone forms, leading-zero embedded IPv4) and false negatives (zone IDs, full-form embedded IPv4, upper-case ::FFFF:).
  • C27 EmailAddress accepts malformed dot/hyphen placements ('a..b@example.com') and rejects common valid local parts and IDN (xn--) TLDs.
  • X07 EmailAddress enforces no RFC length limits (local part > 64, DNS label > 63, address > 254 are accepted).
  • C28 Url accepts invalid hosts/ports and scheme-less strings, and rejects valid URLs with fragments, userinfo or IPv6 hosts.
  • X01 Url accepts non-ASCII look-alike letters in the host (Kelvin sign, dotless i, long s) through re.IGNORECASE.
  • C31 MacAddress accepts mixed separators within one address ('00:1A-2B:3C-4D:5E').

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions