[web-master] main: Treat note starting with https:// as spam

From: Date: Mon, 24 Oct 2022 15:31:11 +0000
Subject: [web-master] main: Treat note starting with https:// as spam
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-30614@lists.php.net to get a copy of this message
Author: Christoph M. Becker (cmb69) Date: 2022-10-24T17:21:02+02:00 Commit: https://github.com/php/web-master/commit/0762e6a1b5bf08fe8cf4dbae9ade83dc48062563 Raw diff: https://github.com/php/web-master/commit/0762e6a1b5bf08fe8cf4dbae9ade83dc48062563.diff Treat note starting with https:// as spam We recently got a lot of these, and it is rather uncommon for a non-spam user note to immediately start with an URL. Closes GH-16. Changed paths: M include/spam-lib.inc Diff: diff --git a/include/spam-lib.inc b/include/spam-lib.inc index e2f723e..9f4b31e 100644 --- a/include/spam-lib.inc +++ b/include/spam-lib.inc @@ -78,6 +78,7 @@ function check_spam_words ($text, $badwords) { // * BBCode links (a common spam technique) // * HTML anchors // * Too many http://'s +// * post is starting with an URL function check_spam_urls ($text, $httplimit = 4) { if (preg_match('/\[(url|link)=[^]]+\]/', $text)) { return true; @@ -88,6 +89,9 @@ function check_spam_urls ($text, $httplimit = 4) { if ((int) preg_match_all('~http(?:s)?://~', $text) >= $httplimit) { return true; } + if (preg_match('^https://', $text)) { + return true; + } return false; }

« previous php.webmaster (#30614) next »