1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 03:54:10 +01:00

[feature/passwords] Properly treat duplicates in combined hashes

PHPBB3-11610
This commit is contained in:
Marc Alexander 2013-06-27 16:14:08 +02:00
parent 556048177f
commit cfbd858bd7
2 changed files with 9 additions and 1 deletions

View File

@ -129,6 +129,10 @@ class phpbb_crypto_manager
{
if (isset($this->type_map["\${$type}\$"]))
{
while(isset($return_ary[$type]))
{
$type = $type + ' ';
}
$return_ary[$type] = $this->type_map["\${$type}\$"];
}
else

View File

@ -131,7 +131,7 @@ class phpbb_crypto_manager_test extends PHPUnit_Framework_TestCase
return array(
array(
'crypto.driver.salted_md5',
array('crypto.driver.bcrypt_2y', 'crypto.driver.bcrypt'),
array('crypto.driver.bcrypt_2y'),
),
array(
'crypto.driver.salted_md5',
@ -141,6 +141,10 @@ class phpbb_crypto_manager_test extends PHPUnit_Framework_TestCase
'crypto.driver.phpass',
array('crypto.driver.salted_md5'),
),
array(
'crypto.driver.salted_md5',
array('crypto.driver.bcrypt_2y', 'crypto.driver.bcrypt'),
),
);
}