From 53aa0344bff63d1807267003c0f4db2bc4786378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 18 Oct 2018 10:22:55 +0200 Subject: [PATCH] FIX: properly import vBulletin's hashed password --- script/import_scripts/vbulletin.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/script/import_scripts/vbulletin.rb b/script/import_scripts/vbulletin.rb index 23923d0baa0..4c5216a679a 100644 --- a/script/import_scripts/vbulletin.rb +++ b/script/import_scripts/vbulletin.rb @@ -126,8 +126,15 @@ EOM batches(BATCH_SIZE) do |offset| users = mysql_query(<<-SQL - SELECT userid, username, homepage, usertitle, usergroupid, joindate, email, - CONCAT(password, ':', salt) AS crypted_password + SELECT userid + , username + , homepage + , usertitle + , usergroupid + , joindate + , email + , password + , salt FROM #{TABLE_PREFIX}user WHERE userid > #{last_user_id} ORDER BY userid @@ -145,13 +152,15 @@ EOM email = user["email"].presence || fake_email email = fake_email unless email[EmailValidator.email_regex] + password = [user["password"].presence, user["salt"].presence].compact.join(":") + username = @htmlentities.decode(user["username"]).strip { id: user["userid"], name: username, username: username, - password: user["crypted_password"], + password: password, email: email, website: user["homepage"].strip, title: @htmlentities.decode(user["usertitle"]).strip,