aboutsummaryrefslogtreecommitdiffstats
path: root/tests/passwords
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-05-11 22:23:23 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-06-01 21:31:04 +0200
commit1e758ba7f01fb07c2f497d755837bdce9bd57f18 (patch)
treebd288e8fe71af40ba694ace905e5d2eac7087c83 /tests/passwords
parent57e4fb38106a3ece446b8713693f89c8745538dc (diff)
downloadforums-1e758ba7f01fb07c2f497d755837bdce9bd57f18.tar
forums-1e758ba7f01fb07c2f497d755837bdce9bd57f18.tar.gz
forums-1e758ba7f01fb07c2f497d755837bdce9bd57f18.tar.bz2
forums-1e758ba7f01fb07c2f497d755837bdce9bd57f18.tar.xz
forums-1e758ba7f01fb07c2f497d755837bdce9bd57f18.zip
[ticket/12352] Add passwords driver for passwords that should be converted
This driver will only be used for getting the new $CP$ prefix that will signal that the hash is a legacy hash that needs to be converted. PHPBB3-12352
Diffstat (limited to 'tests/passwords')
-rw-r--r--tests/passwords/manager_test.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
index c2fda170a1..d0f860c4c5 100644
--- a/tests/passwords/manager_test.php
+++ b/tests/passwords/manager_test.php
@@ -30,6 +30,7 @@ class phpbb_passwords_manager_test extends \phpbb_test_case
'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),
+ 'passwords.driver.convert_password' => new \phpbb\passwords\driver\convert_password($config, $this->driver_helper),
'passwords.driver.sha1_smf' => new \phpbb\passwords\driver\sha1_smf($config, $this->driver_helper),
);
@@ -134,13 +135,16 @@ class phpbb_passwords_manager_test extends \phpbb_test_case
{
return array(
array('foobar', '3858f62230ac3c915f300c664312c63f', true),
+ array('foobar', '$CP$3858f62230ac3c915f300c664312c63f', true),
+ array('foobar', '$CP$3858f62230ac3c915f300c', false),
array('foobar', '$S$b57a939fa4f2c04413a4eea9734a0903647b7adb93181295', false),
array('foobar', '$2a\S$kkkkaakdkdiej39023903204j2k3490234jk234j02349', false),
array('foobar', '$H$kklk938d023k//k3023', false),
array('foobar', '$H$3PtYMgXb39lrIWkgoxYLWtRkZtY3AY/', false),
array('foobar', '$2a$kwiweorurlaeirw', false),
array('foobar', '6f9e2a1899e1f15708fd2e554103480eb53e8b57', false),
- array('foobar', '6f9e2a1899e1f15708fd2e554103480eb53e8b57', true, array('login_name' => 'test')),
+ array('foobar', '6f9e2a1899e1f15708fd2e554103480eb53e8b57', false, array('login_name' => 'test')),
+ array('foobar', '$CP$6f9e2a1899e1f15708fd2e554103480eb53e8b57', true, array('login_name' => 'test')),
array('foobar', '6f9e2a1899', false, array('login_name' => 'test')),
);
}