mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Re-enable antibot system, disable hash expiration & unicode
This commit is contained in:
parent
b49fe85345
commit
2f04aefdf5
@ -197,7 +197,7 @@ function _create_antibot($board, $thread) {
|
|||||||
|
|
||||||
if (!isset($purged_old_antispam)) {
|
if (!isset($purged_old_antispam)) {
|
||||||
$purged_old_antispam = true;
|
$purged_old_antispam = true;
|
||||||
query('DELETE FROM ``antispam`` WHERE `expires` < UNIX_TIMESTAMP()') or error(db_error());
|
//query('DELETE FROM ``antispam`` WHERE `expires` < UNIX_TIMESTAMP()') or error(db_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($thread)
|
if ($thread)
|
||||||
@ -276,6 +276,8 @@ function checkSpam(array $extra_salt = array()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function incrementSpamHash($hash) {
|
function incrementSpamHash($hash) {
|
||||||
|
if ($hash === true) return;
|
||||||
|
|
||||||
$query = prepare('UPDATE ``antispam`` SET `passed` = `passed` + 1 WHERE `hash` = :hash');
|
$query = prepare('UPDATE ``antispam`` SET `passed` = `passed` + 1 WHERE `hash` = :hash');
|
||||||
$query->bindValue(':hash', $hash);
|
$query->bindValue(':hash', $hash);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
@ -1089,7 +1089,7 @@
|
|||||||
$config['error']['image_hard_limit'] = _('Thread has reached its maximum image limit.');
|
$config['error']['image_hard_limit'] = _('Thread has reached its maximum image limit.');
|
||||||
$config['error']['nopost'] = _('You didn\'t make a post.');
|
$config['error']['nopost'] = _('You didn\'t make a post.');
|
||||||
$config['error']['flood'] = _('Flood detected; Post discarded.');
|
$config['error']['flood'] = _('Flood detected; Post discarded.');
|
||||||
$config['error']['spam'] = _('Your request looks automated; Post discarded.');
|
$config['error']['spam'] = _('Your request looks automated; Post discarded. Try refreshing the page.');
|
||||||
$config['error']['unoriginal'] = _('Unoriginal content!');
|
$config['error']['unoriginal'] = _('Unoriginal content!');
|
||||||
$config['error']['muted'] = _('Unoriginal content! You have been muted for %d seconds.');
|
$config['error']['muted'] = _('Unoriginal content! You have been muted for %d seconds.');
|
||||||
$config['error']['youaremuted'] = _('You are muted! Expires in %d seconds.');
|
$config['error']['youaremuted'] = _('You are muted! Expires in %d seconds.');
|
||||||
|
@ -203,6 +203,8 @@ $config['mask_db_error'] = true;
|
|||||||
$config['ban_appeals'] = true;
|
$config['ban_appeals'] = true;
|
||||||
$config['show_sages'] = false;
|
$config['show_sages'] = false;
|
||||||
$config['katex'] = false;
|
$config['katex'] = false;
|
||||||
|
$config['enable_antibot'] = true;
|
||||||
|
$config['spam']['unicode'] = false;
|
||||||
// 8chan specific mod pages
|
// 8chan specific mod pages
|
||||||
require '8chan-mod-pages.php';
|
require '8chan-mod-pages.php';
|
||||||
|
|
||||||
|
6
post.php
6
post.php
@ -283,11 +283,11 @@ elseif (isset($_POST['post'])) {
|
|||||||
error($config['error']['noaccess']);
|
error($config['error']['noaccess']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (!$post['mod']) {
|
if (!$post['mod']) {
|
||||||
$post['antispam_hash'] = checkSpam(array($board['uri'], isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null)));
|
$post['antispam_hash'] = checkSpam(array($board['uri'], isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null)));
|
||||||
if ($post['antispam_hash'] === true)
|
if ($post['antispam_hash'] === true && $config['enable_antibot'])
|
||||||
error($config['error']['spam']);
|
error($config['error']['spam']);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if ($config['robot_enable'] && $config['robot_mute']) {
|
if ($config['robot_enable'] && $config['robot_mute']) {
|
||||||
checkMute();
|
checkMute();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user