diff --git a/package.json b/package.json index 61caba64a54..c728b51f8dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eth-phishing-detect", - "version": "1.1.15", + "version": "1.1.16", "description": "Utility for detecting phishing domains targeting Ethereum users", "main": "src/index.js", "scripts": { diff --git a/src/detector.js b/src/detector.js index f3b56380d22..76c1e814f41 100644 --- a/src/detector.js +++ b/src/detector.js @@ -11,7 +11,11 @@ class PhishingDetector { } check (domain) { - const source = domainToParts(domain) + let fqdn = domain.substring(domain.length - 1) === "." + ? domain.slice(0, -1) + : domain; + + const source = domainToParts(fqdn) // if source matches whitelist domain (or subdomain thereof), PASS const whitelistMatch = matchPartsAgainstList(source, this.whitelist) diff --git a/test/index.js b/test/index.js index 56058240838..ff97103aa3a 100644 --- a/test/index.js +++ b/test/index.js @@ -51,6 +51,7 @@ function startTests () { "metamask.com", "wallet-ethereum.net", "etherclassicwallet.com", + "wallet-ethereum.net." //Test for absolute fully-qualified domain name ]) // whitelist