Skip to content
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

Fix IPv6 validation #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

eerielg
Copy link

@eerielg eerielg commented Sep 17, 2024

This updated the regex used to validate that a string is a valid IPv6 CIDR. The complex regex here was NOT developed by me, from scratch, but taken from the widely used "cidr-regex" npm package.

Given its widespread use, and that it successfully categorized all tests I threw at it (Which consisted of the list of reserved IPv6 ranges on this wikipedia page: https://en.wikipedia.org/wiki/Reserved_IP_addresses), I believe it is correct.

Resolves #6

@cp2004
Copy link
Member

cp2004 commented Sep 21, 2024

Thanks so much for the PR. I'll have a look as soon as I get a chance, and I will try my hardest not to forget about this!

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

Successfully merging this pull request may close these issues.

[Request] Better IPv6 support
2 participants