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

isV6Format() returns true for IPv4 addresses #67

Open
WRMSRwasTaken opened this issue Dec 25, 2016 · 2 comments
Open

isV6Format() returns true for IPv4 addresses #67

WRMSRwasTaken opened this issue Dec 25, 2016 · 2 comments

Comments

@WRMSRwasTaken
Copy link

Hi,

isV6Format() returns true for non IPv6 mapped IPv4 adresses:

console.log(require('ip').isV6Format('8.8.8.8')); //true

Using Version 1.1.4 on Node v7.3.0

@Redsandro
Copy link

Redsandro commented Jan 19, 2017

Was going to report the same.

ip.isV4Format('127.0.0.1') // true
ip.isV6Format('127.0.0.1') // true

ip.isV4Format('::1') // false
ip.isV6Format('::1') // true

ip 1.1.4 on node 4.2.6

@Jolg42
Copy link

Jolg42 commented Jun 5, 2018

Same for me, I switched to https://github.com/LinusU/is-my-ip-valid

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

3 participants