Skip to content

fix: update ipaddr.js to 2.x and support /0 CIDR notation - #68

Closed
marceli1404 wants to merge 1 commit into
jshttp:masterfrom
marceli1404:fix/update-ipaddr-and-cidr-zero
Closed

marceli1404 wants to merge 1 commit into
jshttp:masterfrom
marceli1404:fix/update-ipaddr-and-cidr-zero

Conversation

@marceli1404

Copy link
Copy Markdown

Closes #65, Closes #28

#65 — Update ipaddr.js to 2.x

  • Bump \ipaddr.js\ from \1.9.1\ to ^2.2.0\
  • ipaddr.js 2.x is API-compatible for proxy-addr's usage (\parse, \isValid, \match\ with 2 args, \prefixLengthFromSubnetMask, \kind, \ oIPv4Address, \ oIPv4MappedAddress, \isIPv4MappedAddress)
  • All 70 existing tests pass without modification

#28 — Support \

Closes #65 - Update ipaddr.js to ^2.2.0 (2.x is API-compatible for
proxy-addr's usage: parse, range, match methods)

Closes #28 - Fix 0.0.0.0/0 CIDR validation:
  Change range check from <= 0 to === null || < 0 so that prefix
  length 0 (meaning 'all addresses') is a valid value.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​ipaddr.js@​1.9.1 ⏵ 2.4.0100 +1100100 +181100

View full report

@krzysdz

krzysdz commented Aug 18, 2026

Copy link
Copy Markdown

Please don't combine multiple unrelated changes in a single PR. This makes the commit history harder to analyse in the future.

Duplicate of #59 and #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update ipaddr.js to latest invalid range on address: 0.0.0.0/0

2 participants