Skip to content

IP address validation is failing if CIDR is included contrary to documentation #287

Closed

Description

@ddsulli1

Version:
validators==0.20.0

Per the documentation, support for CIDR notation was added in ver 0.14.0. Using the examples from documentation, I still receive a validation error:

validators.ipv4('1.1.1.1/8')
ValidationFailure(func=ipv4, args={'value': '1.1.1.1/8'})

Activity

  1. nandgator commented on Aug 15, 2023

    @nandgator
    Collaborator

    Yes it was handled in #125, but back then the function was named differently:

    Python 3.11.3 (main, Jun  5 2023, 09:32:32) [GCC 13.1.1 20230429] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import validators
    >>> validators.__version__
    '0.20.0'
    >>> validators.ip
    validators.ip_address  validators.ipv4(       validators.ipv4_cidr(  validators.ipv6(       validators.ipv6_cidr(
    >>> validators.ipv4_cidr('1.1.1.1/8')
    True

    Please, it is highly recommended that you switch to latest version (0.21.2) as version v0.20.0 (and most likely lower versions) have a ReDoS vulnerability.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions