From 68046d4a2677406372a71bef1a5f0ab59efc4b62 Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Tue, 4 May 2021 22:23:28 +0000 Subject: [PATCH 1/4] Add filter for known bot spammer --- inc/instance-config.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inc/instance-config.php b/inc/instance-config.php index cdccbc33..f802286f 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -402,6 +402,16 @@ $config['wordfilters'][] = array('/trann(y|ie)?/i', 'transhumanist', true); $config['wordfilters'][] = array('/nigger/i', 'uyghur', true); $config['wordfilters'][] = array('/nigg/i', 'uygh', true); +// Filter for a soyjak bot +$config['filters'][] = array( + 'condition' => array( + '!body' => '/(^[^>]|[\r\n][^>])/', // Greentexting only (does not contain non-greentext) + 'filename' => '/[a-z]{6}.jpg/' // Six lowercase letters, .jpg + ), + 'action' => 'reject', + 'message' => 'Flood detected; Post discarded.' +); + // Changes made via web editor by "zul_admin" @ Fri, 19 Feb 2021 15:06:33 -0800: $config['reply_limit'] = 800; From a4906098a6c124b737a2ca1a2feca32d416c4da4 Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Tue, 4 May 2021 22:27:15 +0000 Subject: [PATCH 2/4] Increase length range of filename detection --- inc/instance-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/instance-config.php b/inc/instance-config.php index f802286f..fed17dbd 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -406,7 +406,7 @@ $config['wordfilters'][] = array('/nigg/i', 'uygh', true); $config['filters'][] = array( 'condition' => array( '!body' => '/(^[^>]|[\r\n][^>])/', // Greentexting only (does not contain non-greentext) - 'filename' => '/[a-z]{6}.jpg/' // Six lowercase letters, .jpg + 'filename' => '/[a-z]{6,12}.jpg/' // Six to 12 lowercase letters, .jpg ), 'action' => 'reject', 'message' => 'Flood detected; Post discarded.' From 16cb2ab75ceae1bdb1919b2a0c52dc2f60b1586c Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Tue, 4 May 2021 22:30:05 +0000 Subject: [PATCH 3/4] Remove range limit for filename --- inc/instance-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/instance-config.php b/inc/instance-config.php index fed17dbd..98bace34 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -406,7 +406,7 @@ $config['wordfilters'][] = array('/nigg/i', 'uygh', true); $config['filters'][] = array( 'condition' => array( '!body' => '/(^[^>]|[\r\n][^>])/', // Greentexting only (does not contain non-greentext) - 'filename' => '/[a-z]{6,12}.jpg/' // Six to 12 lowercase letters, .jpg + 'filename' => '/[a-z]+.jpg/' // Only lowercase letters, .jpg ), 'action' => 'reject', 'message' => 'Flood detected; Post discarded.' From df98d2e66cfcc8236cb6e42ddc472b03e5418e6a Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Tue, 4 May 2021 22:42:06 +0000 Subject: [PATCH 4/4] Fix oversight --- inc/instance-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/instance-config.php b/inc/instance-config.php index 98bace34..12406214 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -406,7 +406,7 @@ $config['wordfilters'][] = array('/nigg/i', 'uygh', true); $config['filters'][] = array( 'condition' => array( '!body' => '/(^[^>]|[\r\n][^>])/', // Greentexting only (does not contain non-greentext) - 'filename' => '/[a-z]+.jpg/' // Only lowercase letters, .jpg + 'filename' => '/^[a-z]+\.jpg/' // Only lowercase letters, .jpg ), 'action' => 'reject', 'message' => 'Flood detected; Post discarded.'