Skip to content

Commit baeb2bb

Browse files
committed
doc: add note to net.isIP() about limitations
Closes: nodejs#40966
1 parent 6d8ab76 commit baeb2bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/net.md

+8
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,10 @@ Tests if input is an IP address. Returns `0` for invalid strings,
14831483
returns `4` for IP version 4 addresses, and returns `6` for IP version 6
14841484
addresses.
14851485

1486+
`net.isIP()` validates conventional IP formats only. There are some
1487+
technically permissible IP formats that it will reject. In practice, the formats
1488+
that it rejects are not widely used except perhaps for malicious purposes.
1489+
14861490
## `net.isIPv4(input)`
14871491

14881492
<!-- YAML
@@ -1494,6 +1498,10 @@ added: v0.3.0
14941498

14951499
Returns `true` if input is a version 4 IP address, otherwise returns `false`.
14961500

1501+
`net.isIPv4()` validates conventional IP formats only. There are some
1502+
technically permissible IP formats that it will reject. In practice, the formats
1503+
that it rejects are not widely used except perhaps for malicious purposes.
1504+
14971505
## `net.isIPv6(input)`
14981506

14991507
<!-- YAML

0 commit comments

Comments
 (0)