From f9aaed70202cfa5f07e7d73ee908f4843321d64d Mon Sep 17 00:00:00 2001 From: Ruoxin Wang Date: Thu, 22 Jul 2021 17:55:02 +1000 Subject: [PATCH] FIX: MyBB importer exposes deleted posts (#13700) The MyBB importer exposes posts marked as deleted in MyBB. This may lead to a privacy issue. --- script/import_scripts/mybb.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/import_scripts/mybb.rb b/script/import_scripts/mybb.rb index 0b78cf0f7a..2189371fb2 100644 --- a/script/import_scripts/mybb.rb +++ b/script/import_scripts/mybb.rb @@ -26,6 +26,7 @@ class ImportScripts::MyBB < ImportScripts::Base BATCH_SIZE = 1000 BASE = "" QUIET = true + IMPORT_DELETED_POSTS = false def initialize super @@ -115,6 +116,7 @@ class ImportScripts::MyBB < ImportScripts::Base FROM #{TABLE_PREFIX}posts p, #{TABLE_PREFIX}threads t WHERE p.tid = t.tid + #{'AND (p.visible = 1 AND t.visible = 1)' unless IMPORT_DELETED_POSTS} ORDER BY p.dateline LIMIT #{BATCH_SIZE} OFFSET #{offset};