FIX: MyBB importer exposes deleted posts (#13700)

The MyBB importer exposes posts marked as deleted in MyBB. This may lead to a privacy issue.
This commit is contained in:
Ruoxin Wang 2021-07-22 17:55:02 +10:00 committed by GitHub
parent 3cf7a3766a
commit f9aaed7020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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};