aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--phpBB/config/passwords.yml4
-rw-r--r--phpBB/phpbb/passwords/driver/md5_phpbb2.php (renamed from phpBB/phpbb/passwords/driver/phpbb2_md5.php)4
-rw-r--r--tests/passwords/drivers_test.php16
-rw-r--r--tests/passwords/manager_test.php2
4 files changed, 13 insertions, 13 deletions
diff --git a/phpBB/config/passwords.yml b/phpBB/config/passwords.yml
index ae989bccf9..f712e84b42 100644
--- a/phpBB/config/passwords.yml
+++ b/phpBB/config/passwords.yml
@@ -62,8 +62,8 @@ services:
tags:
- { name: passwords.driver }
- passwords.driver.phpbb2_md5:
- class: phpbb\passwords\driver\phpbb2_md5
+ passwords.driver.md5_phpbb2:
+ class: phpbb\passwords\driver\md5_phpbb2
arguments:
- @request
- @passwords.driver.salted_md5
diff --git a/phpBB/phpbb/passwords/driver/phpbb2_md5.php b/phpBB/phpbb/passwords/driver/md5_phpbb2.php
index 0f2bf74850..41a589d3b8 100644
--- a/phpBB/phpbb/passwords/driver/phpbb2_md5.php
+++ b/phpBB/phpbb/passwords/driver/md5_phpbb2.php
@@ -12,9 +12,9 @@ namespace phpbb\passwords\driver;
/**
* @package passwords
*/
-class phpbb2_md5 extends base
+class md5_phpbb2 extends base
{
- const PREFIX = '$phpbb2_md5$';
+ const PREFIX = '$md5_phpbb2$';
/** @var \phpbb\request\request phpBB request object */
protected $request;
diff --git a/tests/passwords/drivers_test.php b/tests/passwords/drivers_test.php
index 0ac4719b45..3ef39df709 100644
--- a/tests/passwords/drivers_test.php
+++ b/tests/passwords/drivers_test.php
@@ -31,7 +31,7 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
'passwords.driver.convert_password' => new \phpbb\passwords\driver\convert_password($config, $this->driver_helper),
'passwords.driver.sha1' => new \phpbb\passwords\driver\sha1($config, $this->driver_helper),
);
- $this->passwords_drivers['passwords.driver.phpbb2_md5'] = new \phpbb\passwords\driver\phpbb2_md5($request, $this->passwords_drivers['passwords.driver.salted_md5'], $phpbb_root_path, $php_ext);
+ $this->passwords_drivers['passwords.driver.md5_phpbb2'] = new \phpbb\passwords\driver\md5_phpbb2($request, $this->passwords_drivers['passwords.driver.salted_md5'], $phpbb_root_path, $php_ext);
}
public function data_helper_encode64()
@@ -122,7 +122,7 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
$this->assertSame($expected, $this->passwords_drivers[$driver]->get_settings_only($hash));
}
- public function data_phpbb2_md5_check()
+ public function data_md5_phpbb2_check()
{
return array(
array(false, 'foobar', 'ae2fc75e20ee25d4520766788fbc96ae'),
@@ -136,9 +136,9 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
}
/**
- * @dataProvider data_phpbb2_md5_check
+ * @dataProvider data_md5_phpbb2_check
*/
- public function test_phpbb2_md5_check($expected, $password, $hash, $request_password = false)
+ public function test_md5_phpbb2_check($expected, $password, $hash, $request_password = false)
{
if (!$request_password)
{
@@ -148,14 +148,14 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
{
$_REQUEST['password'] = $request_password;
}
- $this->assertSame($expected, $this->passwords_drivers['passwords.driver.phpbb2_md5']->check($password, $hash));
+ $this->assertSame($expected, $this->passwords_drivers['passwords.driver.md5_phpbb2']->check($password, $hash));
}
- public function test_phpbb2_md5_unneeded_functions()
+ public function test_md5_phpbb2_unneeded_functions()
{
- $this->assertSame(false, $this->passwords_drivers['passwords.driver.phpbb2_md5']->hash('foobar'));
+ $this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_phpbb2']->hash('foobar'));
- $this->assertSame(false, $this->passwords_drivers['passwords.driver.phpbb2_md5']->get_settings_only('ae2fc75e20ee25d4520766788fbc96ae'));
+ $this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_phpbb2']->get_settings_only('ae2fc75e20ee25d4520766788fbc96ae'));
}
public function test_convert_password_driver()
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
index 24243d76c4..2a53d79027 100644
--- a/tests/passwords/manager_test.php
+++ b/tests/passwords/manager_test.php
@@ -37,7 +37,7 @@ class phpbb_passwords_manager_test extends \phpbb_test_case
'passwords.driver.sha1_smf' => new \phpbb\passwords\driver\sha1_smf($config, $this->driver_helper),
'passwords.driver.sha1' => new \phpbb\passwords\driver\sha1($config, $this->driver_helper),
);
- $this->passwords_drivers['passwords.driver.phpbb2_md5'] = new \phpbb\passwords\driver\phpbb2_md5($request, $this->passwords_drivers['passwords.driver.salted_md5'], $phpbb_root_path, $php_ext);
+ $this->passwords_drivers['passwords.driver.md5_phpbb2'] = new \phpbb\passwords\driver\md5_phpbb2($request, $this->passwords_drivers['passwords.driver.salted_md5'], $phpbb_root_path, $php_ext);
$this->helper = new \phpbb\passwords\helper;
// Set up passwords manager