Skip to content

validators.ipv6 fails to correctly validate compressed ipv6 addresses with trailing colon #176

@robbymeals

Description

@robbymeals
$ pip freeze | grep validators
validators==0.18.0
$ ipython
Loading .env environment variables…
Python 3.7.8 (default, Aug 25 2020, 19:28:30)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.17.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import validators

In [2]: import ipaddress

In [3]: validators.ipv6("0000:0000:0000:0000:0000::")
Out[3]: ValidationFailure(func=ipv6, args={'value': '0000:0000:0000:0000:0000::'})

In [4]: validators.ipv6(ipaddress.IPv6Address("0000:0000:0000:0000:0000::").exploded)
Out[4]: True

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