diff --git a/lib/utils/ip.js b/lib/utils/ip.js index d53a879f..f92fadd7 100644 --- a/lib/utils/ip.js +++ b/lib/utils/ip.js @@ -124,6 +124,8 @@ IP.version = function version(str) { */ IP.isV4Format = function(str) { + if (str.length < 7) + return false; return ipv4Regex.test(str); };