mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
[feature/passwords] Pass list of default types to passwords manager
This list is in the order of how the driver types would be used. If a driver is not supported we will try the subsequent one. PHPBB3-11610
This commit is contained in:
@@ -16,8 +16,8 @@ class phpbb_passwords_helper_test extends PHPUnit_Framework_TestCase
|
||||
$this->driver_helper = new \phpbb\passwords\driver\helper($config);
|
||||
|
||||
$this->passwords_drivers = array(
|
||||
'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
|
||||
'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $this->driver_helper),
|
||||
'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
|
||||
'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $this->driver_helper),
|
||||
'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $this->driver_helper),
|
||||
);
|
||||
|
@@ -22,8 +22,8 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
|
||||
$this->driver_helper = new \phpbb\passwords\driver\helper($config);
|
||||
|
||||
$this->passwords_drivers = array(
|
||||
'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
|
||||
'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $this->driver_helper),
|
||||
'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
|
||||
'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $this->driver_helper),
|
||||
'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $this->driver_helper),
|
||||
);
|
||||
@@ -35,7 +35,7 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
$this->helper = new \phpbb\passwords\helper;
|
||||
// Set up passwords manager
|
||||
$this->manager = new \phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, 'passwords.driver.bcrypt_2y');
|
||||
$this->manager = new \phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, array_keys($this->passwords_drivers));
|
||||
}
|
||||
|
||||
public function hash_password_data()
|
||||
|
Reference in New Issue
Block a user