- Affected version
- 2.2.12
Re https://xenforo.com/community/threads/merging-accounts-who-prevails.211508/#post-1608017
I don't have access to vBulletin 5 authentication data, but from looking at the code the handler sees to be completely broken:
I don't have access to vBulletin 5 authentication data, but from looking at the code the handler sees to be completely broken:
PHP:
protected function getHandler()
{
return new PasswordHash(\XF::config('passwordIterations'), false);
}
protected function createHash($password)
{
return md5($password);
}
public function authenticate($userId, $password)
{
if (!is_string($password) || $password === '' || empty($this->data))
{
return false;
}
$userHash = $this->createHash($password);
return password_verify($userHash, $this->data['token']);
}
- Method
getHandler
is not being used anywhere (most likely forgotten to be removed when usingCore12
as the base?) - Function
password_verify
can't verify plainmd5
hashes - The data in
token
isn't a md5 hash, it'sArgon2Id
orBlowfish
PHP:if (preg_match('#^(blowfish:|argon2id:)#iU', $user['scheme'])) { $import->setPasswordData('XF:vBulletin5', [ 'token' => $user['token'] ]); return $import; } else if ($info = explode(' ', $user['token'])) { $import->setPasswordData('XF:vBulletin', [ 'hash' => $info[0], 'salt' => $info[1] ]); return $import; }
Last edited: