ip.cidrSubnet('efef::efef::/64').contains('::1') returns true
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
This shouldn't be right I think
Additionally since the address has two `::` I think it's invalid, too
Test in REPL:
```
const ip=require('ip')
ip.cidrSubnet('efef::efef::/64').contains('::1')
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the provided REPL calls, then trace the cidrSubnet and contains entry points to the IPv6 parsing and validation logic. Add a regression test for the malformed address containing two `::`; done means the invalid CIDR is rejected or no longer reports that `::1` is contained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100