From 33534b5856a233d16b1f8c7f460a69a407cc6a97 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Thu, 14 Mar 2024 05:58:23 -0700 Subject: [PATCH 1/4] fix critical typo for simple spam --- templates/post_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/post_form.html b/templates/post_form.html index a1142ea2..b70f2f54 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -217,7 +217,7 @@ {% endif %} {% if config.simple_spam and not id %} - {{ config.simple_spam.prompt }} + {{ config.simple_spam.question }} {{ antibot.html() }} From 28df28de26053a674b4b717203c09c831b579865 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Thu, 14 Mar 2024 06:05:43 -0700 Subject: [PATCH 2/4] add some more info about this as this is basically questycaptcha --- inc/config.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/config.php b/inc/config.php index 8c1c5673..e6d6f7bc 100644 --- a/inc/config.php +++ b/inc/config.php @@ -307,9 +307,11 @@ 'simple_spam' ); - // Enable simple anti-spam measure. + // Enable simple anti-spam measure. Requires the end-user to answer a question before making a post. + //Works very well against uncustomized spam. + //Answers are case-insensitive. $config['simple_spam'] = array ( - 'question' => 'What is 2 + 3?', + 'question' => 'What\'s 2+3?', 'answer' => '5' ); From 954bb08762f3ce33340f3b505b653085ac59a1b8 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Thu, 14 Mar 2024 06:06:28 -0700 Subject: [PATCH 3/4] disable by default, like other captchas --- inc/config.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/config.php b/inc/config.php index e6d6f7bc..7a2f603d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -310,10 +310,12 @@ // Enable simple anti-spam measure. Requires the end-user to answer a question before making a post. //Works very well against uncustomized spam. //Answers are case-insensitive. + /* $config['simple_spam'] = array ( 'question' => 'What\'s 2+3?', 'answer' => '5' ); + */ // Enable reCaptcha to make spam even harder. Rarely necessary. $config['recaptcha'] = false; From f48cf068d6c8af36bf03001d30b18a7ed32fbdee Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Thu, 14 Mar 2024 06:10:18 -0700 Subject: [PATCH 4/4] make case-insensitive --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index ddfb1f18..86178cde 100644 --- a/post.php +++ b/post.php @@ -559,7 +559,7 @@ if (isset($_POST['delete'])) { if (!$dropped_post) { if (isset($config['simple_spam']) && $config['simple_spam'] && $post['op']) { - if (!isset($_POST['simple_spam']) || $config['simple_spam']['answer'] != $_POST['simple_spam']) { + if (!isset($_POST['simple_spam']) || strtolower($config['simple_spam']['answer']) != strtolower($_POST['simple_spam'])) { error($config['error']['simple_spam']); } }