[web-master] main: Fix recently introduced regex
| From: | Christoph M. Becker | Date: | Mon, 24 Oct 2022 16:27:54 +0000 |
| Subject: | [web-master] main: Fix recently introduced regex | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30615@lists.php.net to get a copy of this message | ||
Author: Christoph M. Becker (cmb69)
Date: 2022-10-24T18:17:44+02:00
Commit: https://github.com/php/web-master/commit/0a0bcf6055cadde7c07a733ba1e8c865fb440bf0
Raw diff: https://github.com/php/web-master/commit/0a0bcf6055cadde7c07a733ba1e8c865fb440bf0.diff
Fix recently introduced regex
Changed paths:
M include/spam-lib.inc
Diff:
diff --git a/include/spam-lib.inc b/include/spam-lib.inc
index 9f4b31e..8967801 100644
--- a/include/spam-lib.inc
+++ b/include/spam-lib.inc
@@ -89,7 +89,7 @@ function check_spam_urls ($text, $httplimit = 4) {
if ((int) preg_match_all('~http(?:s)?://~', $text) >= $httplimit) {
return true;
}
- if (preg_match('^https://', $text)) {
+ if (preg_match('~^https://~', $text)) {
return true;
}
return false;