Skip to content

Conversation

M393
Copy link

@M393 M393 commented Feb 21, 2024

This regex was case-sensitive and only matched lowercase ffff.
In other places matching is already case-insensitive.

node-ip/lib/ip.js

Lines 325 to 329 in 3b0994a

return /^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)
|| /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)
|| /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i
.test(addr)
|| /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)

@ouuan
Copy link

ouuan commented Feb 23, 2024

Unfortunately, this is still far from complete. See #143

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.

3 participants