mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-30 04:58:37 +01:00
[ticket/13065] Fix rehashing of stored password hash in phpBB2 convertor.
PHPBB3-13065
This commit is contained in:
parent
a45df1d840
commit
b71571b793
@ -896,8 +896,7 @@ if (!$get_info)
|
||||
array('user_regdate', 'users.user_regdate', ''),
|
||||
array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang
|
||||
array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')),
|
||||
array('user_password', 'users.user_password', 'phpbb_hash'),
|
||||
array('user_pass_convert', 1, ''),
|
||||
array('user_password', 'users.user_password', 'phpbb_convert_password_hash'),
|
||||
array('user_posts', 'users.user_posts', 'intval'),
|
||||
array('user_email', 'users.user_email', 'strtolower'),
|
||||
array('user_email_hash', 'users.user_email', 'gen_email_hash'),
|
||||
|
@ -1969,3 +1969,13 @@ function phpbb_add_notification_options($user_notify_pm)
|
||||
|
||||
$sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
|
||||
}
|
||||
|
||||
function phpbb_convert_password_hash($hash)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
$manager = $phpbb_container->get('passwords.manager');
|
||||
$hash = $manager->hash($hash, '$H$');
|
||||
|
||||
return '$CP$' . $hash;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user