[web-bugs] master: Count https:// URLs towards spam
| From: | Nikita Popov | Date: | Thu, 26 Aug 2021 12:21:47 +0000 |
| Subject: | [web-bugs] master: Count https:// URLs towards spam | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-29554@lists.php.net to get a copy of this message | ||
Author: Nikita Popov (nikic)
Date: 2021-08-26T14:22:04+02:00
Commit: https://github.com/php/web-bugs/commit/f259231094cc03c490903e55d8b40ad4db96621f
Raw diff: https://github.com/php/web-bugs/commit/f259231094cc03c490903e55d8b40ad4db96621f.diff
Count https:// URLs towards spam
Changed paths:
M include/functions.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index f52f5c7d..7c4841a1 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -195,7 +195,9 @@ function is_spam($string)
return false;
}
- if (substr_count(strtolower($string), 'http://') > 5)
{
+ $count = substr_count(strtolower($string), 'http://')
+ + substr_count(strtolower($string), 'https://');
+ if ($count > 5) {
return true;
}