[web-bugs] master: Make spam filter stricter again
| From: | Nikita Popov | Date: | Sun, 09 Jul 2023 07:34:52 +0000 |
| Subject: | [web-bugs] master: Make spam filter stricter again | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30915@lists.php.net to get a copy of this message | ||
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.";
}
}