diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-10-27 23:38:53 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-10-27 23:38:53 +0100 |
commit | aa916fc43f256952eafc81379af9e0b292497044 (patch) | |
tree | dc9dc6d0eaa01e202db9fb6af4c81de27e9a5fa6 /phpBB/phpbb | |
parent | d693d91e26e3200916b0f7fd475de1e968a43fee (diff) | |
parent | b295fa4f4f5d74deec478e5ddb74c1975a32421c (diff) | |
download | forums-aa916fc43f256952eafc81379af9e0b292497044.tar forums-aa916fc43f256952eafc81379af9e0b292497044.tar.gz forums-aa916fc43f256952eafc81379af9e0b292497044.tar.bz2 forums-aa916fc43f256952eafc81379af9e0b292497044.tar.xz forums-aa916fc43f256952eafc81379af9e0b292497044.zip |
Merge pull request #3077 from marc1706/ticket/13225
[ticket/13225] Use passwords manager instead of phpbb_hash in migration
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php index f593c32181..2cc7786046 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php @@ -55,6 +55,9 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration public function hash_old_passwords() { + global $phpbb_container; + + $passwords_manager = $phpbb_container->get('passwords.manager'); $sql = 'SELECT user_id, user_password FROM ' . $this->table_prefix . 'users WHERE user_pass_convert = 1'; @@ -65,7 +68,7 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration if (strlen($row['user_password']) == 32) { $sql_ary = array( - 'user_password' => phpbb_hash($row['user_password']), + 'user_password' => '$CP$' . $passwords_manager->hash($row['user_password'], 'passwords.driver.salted_md5'), ); $this->sql_query('UPDATE ' . $this->table_prefix . 'users SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id']); |