Author: Peter Cowburn (salathe)
Date: 2022-08-07T10:08:31+01:00

Commit: 
https://github.com/php/web-master/commit/104336042d53c7925e009d4a89c287877db4297a
Raw diff: 
https://github.com/php/web-master/commit/104336042d53c7925e009d4a89c287877db4297a.diff

consider simple html anchors as spam

Changed paths:
  M  include/spam-lib.inc


Diff:

diff --git a/include/spam-lib.inc b/include/spam-lib.inc
index 14eeb1f..ad50332 100644
--- a/include/spam-lib.inc
+++ b/include/spam-lib.inc
@@ -68,11 +68,15 @@ function check_spam_words ($text, $badwords) {
 
 // Miscellaneous URL related spam checks
 // * BBCode links (a common spam technique)
+// * HTML anchors
 // * Too many http://'s
 function check_spam_urls ($text, $httplimit = 4) {
     if (preg_match('/\[(url|link)=[^]]+\]/', $text)) {
         return true;
     }
+    if (preg_match('~<a href="[^"]+">.+</a>~', $text)) {
+        return true;
+    }
     if ((int) preg_match_all('~http(?:s)?://~', $text) >= $httplimit) {
         return true;
     }

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to