Author: Nikita Popov (nikic)
Date: 2023-07-09T09:21:21+02:00

Commit: 
https://github.com/php/web-bugs/commit/bc9db6eacf574128c1944cf54a934f7e55cb43f2
Raw diff: 
https://github.com/php/web-bugs/commit/bc9db6eacf574128c1944cf54a934f7e55cb43f2.diff

Make spam filter stricter again

Changed paths:
  M  include/functions.php


Diff:

diff --git a/include/functions.php b/include/functions.php
index 2f70bb7b..961ce0d6 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -197,7 +197,7 @@ function is_spam($string)
 
     if (preg_match_all('/https?:\/\/(\S+)/', $string, $matches)) {
         foreach ($matches[1] as $match) {
-            if (!preg_match('/^[^\/]*(php\.net|github\.com)/', $match)) {
+            if (!preg_match('/^[^\/)]*(php\.net|github\.com)/', $match)) {
                 return "Due to large amounts of spam, only links to php.net 
and github.com (including subdomains like gist.github.com) are allowed.";
             }
         }

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

Reply via email to