Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ddsulli1 opened this issue Aug 14, 2023 · 1 comment

Comments

@ddsulli1
Copy link

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'})

@yozachar
Copy link
Collaborator

yozachar commented Aug 15, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants