mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/passwords] Properly treat duplicates in combined hashes
PHPBB3-11610
This commit is contained in:
parent
556048177f
commit
cfbd858bd7
2 changed files with 9 additions and 1 deletions
|
@ -129,6 +129,10 @@ class phpbb_crypto_manager
|
||||||
{
|
{
|
||||||
if (isset($this->type_map["\${$type}\$"]))
|
if (isset($this->type_map["\${$type}\$"]))
|
||||||
{
|
{
|
||||||
|
while(isset($return_ary[$type]))
|
||||||
|
{
|
||||||
|
$type = $type + ' ';
|
||||||
|
}
|
||||||
$return_ary[$type] = $this->type_map["\${$type}\$"];
|
$return_ary[$type] = $this->type_map["\${$type}\$"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -131,7 +131,7 @@ class phpbb_crypto_manager_test extends PHPUnit_Framework_TestCase
|
||||||
return array(
|
return array(
|
||||||
array(
|
array(
|
||||||
'crypto.driver.salted_md5',
|
'crypto.driver.salted_md5',
|
||||||
array('crypto.driver.bcrypt_2y', 'crypto.driver.bcrypt'),
|
array('crypto.driver.bcrypt_2y'),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'crypto.driver.salted_md5',
|
'crypto.driver.salted_md5',
|
||||||
|
@ -141,6 +141,10 @@ class phpbb_crypto_manager_test extends PHPUnit_Framework_TestCase
|
||||||
'crypto.driver.phpass',
|
'crypto.driver.phpass',
|
||||||
array('crypto.driver.salted_md5'),
|
array('crypto.driver.salted_md5'),
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'crypto.driver.salted_md5',
|
||||||
|
array('crypto.driver.bcrypt_2y', 'crypto.driver.bcrypt'),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue