From eb6a07c19a6c9d825b9ae89595329243cc87bac1 Mon Sep 17 00:00:00 2001 From: Bui Date: Thu, 25 Sep 2014 09:32:34 +0900 Subject: [PATCH 1/3] add global column to reports table --- install.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sql b/install.sql index 969107a2..7310014b 100644 --- a/install.sql +++ b/install.sql @@ -220,6 +220,7 @@ CREATE TABLE IF NOT EXISTS `reports` ( `board` varchar(58) CHARACTER SET utf8 DEFAULT NULL, `post` int(11) NOT NULL, `reason` text NOT NULL, + `global` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; From b3532ba54610aeddb5ee661528953fc0b44bdf84 Mon Sep 17 00:00:00 2001 From: Bui Date: Thu, 25 Sep 2014 09:48:46 +0900 Subject: [PATCH 2/3] allow mods to bypass DNSBL checks --- post.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/post.php b/post.php index 88189572..9e1141a7 100644 --- a/post.php +++ b/post.php @@ -200,8 +200,6 @@ if (isset($_POST['delete'])) { if ($config['referer_match'] !== false && (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], rawurldecode($_SERVER['HTTP_REFERER'])))) error($config['error']['referer']); - - checkDNSBL(); // Check if banned checkBan($board['uri']); @@ -243,6 +241,9 @@ if (isset($_POST['delete'])) { $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) error($config['error']['spam']); + + // Check DNSBL + checkDNSBL(); } if ($config['robot_enable'] && $config['robot_mute']) { From abbb6c282d525bd8c713c0967c86c3591cbde413 Mon Sep 17 00:00:00 2001 From: Bui Date: Thu, 25 Sep 2014 10:07:55 +0900 Subject: [PATCH 3/3] Revert "allow mods to bypass DNSBL checks" This reverts commit b3532ba54610aeddb5ee661528953fc0b44bdf84. --- post.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/post.php b/post.php index 9e1141a7..88189572 100644 --- a/post.php +++ b/post.php @@ -200,6 +200,8 @@ if (isset($_POST['delete'])) { if ($config['referer_match'] !== false && (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], rawurldecode($_SERVER['HTTP_REFERER'])))) error($config['error']['referer']); + + checkDNSBL(); // Check if banned checkBan($board['uri']); @@ -241,9 +243,6 @@ if (isset($_POST['delete'])) { $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) error($config['error']['spam']); - - // Check DNSBL - checkDNSBL(); } if ($config['robot_enable'] && $config['robot_mute']) {