From 46c389d20317e59df22c403da117fa9bde3d3553 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Wed, 14 Feb 2024 15:18:47 -0700 Subject: [PATCH] Match spam domains regardless of "www." --- endpoints/net.contactspam.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/endpoints/net.contactspam.php b/endpoints/net.contactspam.php index 500f7e2..96ff437 100644 --- a/endpoints/net.contactspam.php +++ b/endpoints/net.contactspam.php @@ -163,11 +163,14 @@ try { } if (!$found) { $domainlist[] = $match; + if (strpos($match, "www.") === 0) { + // starts with www, let's strip it and add both to the list to check + $domainlist[] = substr($match, 4); + } } } foreach ($domainlist as $d) { - // check local domain blacklist foreach ($bannedspamdomains as $word) { if ($word == $d) {