enable ant-bot
This commit is contained in:
parent
4e0ba09299
commit
598aed5b7e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
2
post.php
2
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))
|
||||
|
|
Loading…
Reference in New Issue