diff --git a/inc/anti-bot.php b/inc/anti-bot.php index 6035ba8e..7625c4cc 100644 --- a/inc/anti-bot.php +++ b/inc/anti-bot.php @@ -281,7 +281,6 @@ function checkSpam(array $extra_salt = array()) { // Iterate through each input foreach ($inputs as $name => $value) { - print_err("-> " . $name . ' : ' . $value); $_hash .= $name . '=' . $value; } @@ -292,7 +291,6 @@ function checkSpam(array $extra_salt = array()) { $_hash = sha1($_hash . $extra_salt); if ($hash != $_hash) { - print_err("Hash mismatch"); return true; } diff --git a/inc/instance-config.php b/inc/instance-config.php index e47f91e5..ad121c3c 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -104,8 +104,7 @@ $config['post_date'] = '%F (%a) %T'; $config['thread_subject_in_title'] = true; -// this functionality is permanently disabled. -$config['spam']['enabled'] = false; +$config['spam']['enabled'] = true; $config['spam_noticer']['enabled'] = true; $config['spam_noticer']['base_url'] = 'http://localhost:8300'; $config['spam_noticer']['website_name'] = "leftychan_dev"; diff --git a/post.php b/post.php index 7e0bd174..56e1d971 100644 --- a/post.php +++ b/post.php @@ -6,7 +6,6 @@ require_once 'inc/functions.php'; require_once 'inc/anti-bot.php'; require_once 'inc/bans.php'; -require_once 'inc/anti-bot.php'; // DELETE ME FOR DEBUGGING ONLY use Ramsey\Uuid\Uuid; @@ -534,6 +533,7 @@ function handle_post(){ } if (!$post['mod'] && $config['spam']['enabled'] == true) { + print_err("ANTI SPAM IS ENABLED"); $post['antispam_hash'] = checkSpam( array($board['uri'], isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null))