From 1a90451ec28146a9b6b8fc82690be244ec3bf982 Mon Sep 17 00:00:00 2001 From: discomrade Date: Tue, 28 Sep 2021 01:13:40 +0000 Subject: [PATCH] Block D+ on special IP addresses --- inc/mod/pages.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index ef1acfeb..e40061b6 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -2216,6 +2216,9 @@ function mod_deletebyip($boardName, $post, $global = false) { if (!$ip = $query->fetchColumn()) error($config['error']['invalidpost']); + // HACK: Prevent D+ or D++ deletion of Tor node or migration placeholder IP + if ($ip == "127.0.0.1" || $ip == "127.0.0.2") {error("Don't nuke ".$ip);} + $boards = $global ? listBoards() : array(array('uri' => $boardName)); $query = '';