- Fix
08
parsed as decimal while018
rejected. (commit)
This version contains an important security fix. If you are using netmask
<=2.0.0
, please upgrade to2.0.1
or above.
- Rewrite byte parsing without using JS
parseInt()
(commit)- This is CVE-2021-29418.
- Add checks on spaces before and after bytes
- This will now throw an exception when spaces are present like ' 1.2.3.4' or '1. 2.3.4' or '1.2.3.4 '.
- Avoid some useless memory allocations
- New Mocha testing suite, thanks @kaoudis #36
Previous API was treating IPs with less than for bytes as IP with a netmask of the size of the provided bytes (1=8, 2=16, 3=24) and was interpreting the IP as if it was completed with 0s on the right side.
Proper IP parsing for these is to consider missing bytes as being 0s on the left side.
Mask size is no longer infered by the number of bytes provided.
This means that the input 216.240
will no longer be interpreted as 216.240.0.0/16
, but as 0.0.216.240/32
,
as per convention.
See the change.
- Fix improper parsing of hex bytes
This version contains an important security fix. If you are using netmask
<=1.0.6
, please upgrade to1.1.0
or above.
- Fix improper parsing of octal bytes (commit)
- This is CVE-2021-28918.
- See also the npm advisory
- Performance: Avoid large allocations when provided large netmasks (like
/8
)- Thanks @dschenkelman #34
- Changes before this release are not documented here. Please see the commit list or the compare view.