Comments (6)
I'd suggest checking out https://github.com/whitequark/ipaddr.js
_.isEqual(ipaddr.process('::ffff:127.0.0.1'), ipaddr.process('127.0.0.1'))
from node-ip.
I had the same issue, went ahead an forked the repo, fixed, and waiting on a merge.
You can view the pull request here: #35
from node-ip.
ip-1.0.1 still have problem with transition ipv4 address
ip.isPrivate("::ffff:127.0.0.1") return false
from node-ip.
Hmm, weird, I'd not taken a look at that method before, had just assumed it converted the passed IP address and verified from there.
Seems that method is using regular expressions to do validation, which is fine for IPv4 but IPv6 is a bit more volatile in parsing. Basically it works, but only for each variation that get's manually added.
Try this: npm install https://github.com/bryanwayb/node-ip.git
Also, my PR had been closed, but there's a few reasons to open a new one. Will reference it here once I've done so.
from node-ip.
New pull request with the fix is #38
from node-ip.
This has since been fixed in version 1.0.2.
from node-ip.
Related Issues (20)
- Buffer() is deprecated due to security and usability issues
- ip.cidrSubnet('efef::efef::/64').contains('::1') returns true
- ip.address() returns 172.27.0.2 in two different computers. HOT 1
- Audit vulnerabilities detected in the ip project on Tag: v1.1.5 HOT 2
- Error on Node 18 HOT 9
- Unexpected identifier HOT 9
- [BUG] error: var numberOfAddresses = 2 ** (32 - maskLength); SyntaxError: Unexpected token * HOT 3
- Version 2.0.0 is not marked as latest
- Add LICENSE.md
- Private IPv4 mapped regions are only matched in dot-notation
- IPv6 to Int or Long
- V2.0.0 Broke the support for older Node versions
- Found a possible security concern HOT 1
- Incompatibilty with webpack 5 because of missing polyfills
- Project Dead? Does it need more maintainers? HOT 5
- How to verify and validate ip/cidr? HOT 1
- Buffer is not a constructor HOT 1
- isPrivate should include 198.18.0.0/15
- isV6Format returns true with IPv4 input
- 🚨 HIGH Severity Vulnerability: Package unsafe for use as of v1.1.8 🚨 HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ip.