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 logic of ip.address('public/private') #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danez
Copy link

@danez danez commented Oct 12, 2016

This reverses the check in the filter method of ip.address(), as the definition
of Array.prototype.filter() says "returns array of elements that pass the test".
It is currently doing exactly the opposite.

We noticed this, as we were doing ip.address('public') but received a private address.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

This reverses the check in the filter method, as the definition
of .filter() says return true for elements that should be in the filtered array
aka pass the test.
Previously it was doing exactly the opposite.
@danez
Copy link
Author

danez commented Oct 12, 2016

The tests are failing for some other reason.

@danez
Copy link
Author

danez commented Oct 25, 2016

This regressed with f52f79e @bryanwayb

@danez danez mentioned this pull request Oct 25, 2016
@julianxhokaxhiu
Copy link

Any update on this?

@julianxhokaxhiu
Copy link

Hi @indutny any update on this?

@betamos
Copy link

betamos commented Apr 25, 2020

This issue is a security vulnerability imo -- the user may accidentally start listen on a public address rather than a private.

As there are no recent commits.. Is this repository maintained?

@ouuan
Copy link

ouuan commented Feb 21, 2024

This issue is a security vulnerability imo -- the user may accidentally start listen on a public address rather than a private.

Maybe we need a CVE like CVE-2023-42282 to attract the author.

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.

4 participants