Update src/Protocol/Relay.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
pull/13856/head
Michael Vogel 2024-01-27 00:13:14 +01:00 zatwierdzone przez GitHub
rodzic b8f80a8d25
commit 120044f3da
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -120,7 +120,7 @@ class Relay
$cleaned = preg_replace('/[@!#]\[url\=.*?\].*?\[\/url\]/ism', '', $body);
$content_cleaned = mb_strtolower(BBCode::toPlaintext($cleaned, false));
if (strlen($content_cleaned) < (strlen($content) - strlen($content_cleaned))) {
if (strlen($content_cleaned) < strlen($content) / 2) {
Logger::info('Possible hashtag spam detected - rejected', ['hashtags' => $tags, 'network' => $network, 'url' => $url, 'causer' => $causer, 'body' => $body]);
return false;
}