mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 20:40:24 +02:00
[feature/passwords] Properly treat duplicates in combined hashes
PHPBB3-11610
This commit is contained in:
@@ -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'),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user