-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cidrv4 validation is faulty #909
Comments
Hi ! I think the doc explains that this module choice is to correct this issue in the parsing. What is the level of confidence on your tool to validate CIDR blocks? Is that implementing the RFC? And if we were to fix this, do I understand that a CIDR block address must be the start of the boundary? // ParseCIDR parses s as a CIDR notation IP address and prefix length,
// like "192.0.2.0/24" or "2001:db8::/32", as defined in
// RFC 4632 and RFC 4291.
//
// It returns the IP address and the network implied by the IP and
// prefix length.
// For example, ParseCIDR("192.0.2.1/24") returns the IP address
// 192.0.2.1 and the network 192.0.2.0/24. |
Happy to accept a PR to correct :) |
@deankarn I can do a PR, it's actually very little change, but a breaking change if I'm correct. Almost all tests in So What do you think? Should we make the change and keep it for a new major? |
I made the PR so you can see what it really means |
## Fixes Or Enhances - Mentions #909 - Disable validation of cidripv4 when ip is not the begining of the block Co-authored-by: Martin Kagamino Lehoux <martin.lehoux@gojob.com> Co-authored-by: Dean Karn <Dean.Karn@gmail.com>
I was using Also, the change was introduced in a v10 patch release even though it's mentioned as breaking in the commit title. I think it would be nice for more regards to backward compatibility when doing such changes. Thanks |
I understand the approach, but also for me it breaks things I did not think it would/should break. Now the subnet I definitely think so!
I would please you guys to bring back the old |
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
cidrv4 validation does not detect invalid cidrv4 such as 172.56.1.0/16 (as can be verified here https://ipduh.com/ip/cidr/)
Code sample, to showcase or reproduce:
The text was updated successfully, but these errors were encountered: