From c2811b7afa5d3517bca9d537f1045d421cff02a8 Mon Sep 17 00:00:00 2001 From: Andrew Van Tassel Date: Tue, 25 Jul 2017 10:34:48 -0600 Subject: [PATCH] Added IP colon fix --- CHANGELOG.md | 5 +++++ lib/api.js | 2 ++ package.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 714c6c1..41abecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## 2.1.1 - 2017-07-25 + +### Fixed +- IP test when IP regex finds a semantic version with a trailing colon + ## 2.1.0 - 2017-02-21 ### Fixed diff --git a/lib/api.js b/lib/api.js index eb221e3..9e3189b 100644 --- a/lib/api.js +++ b/lib/api.js @@ -87,6 +87,7 @@ module.exports = { if(!firstchar.match(/\.|\d|\-/) && !lastchar.match(/\.|\d|\-/) && ( firstchar != '?' && lastchar != '?' ) + && ( firstchar != ':' && lastchar != ':' ) && lastchar != ';' && line.toLowerCase().indexOf(' id '+ip) === -1 && parseInt(ip.substring(0,ip.indexOf('.'))) < 240 //IANA-RESERVED @@ -139,6 +140,7 @@ module.exports = { if(!firstchar.match(/\.|\d|\-/) && !lastchar.match(/\.|\d|\-/) && ( firstchar != '?' && lastchar != '?' ) + && ( firstchar != ':' && lastchar != ':' ) && lastchar != ';' && line.toLowerCase().indexOf(' id '+ip) === -1 && parseInt(ip.substring(0,ip.indexOf('.'))) < 240 //IANA-RESERVED diff --git a/package.json b/package.json index fccee74..5aa445f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mailhops", - "version": "2.1.0", + "version": "2.1.1", "description": "A nodejs module for interacting with the MailHops API.", "main": "main.js", "scripts": {