mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
[feature/passwords] Add convert flag for converting to default
PHPBB3-11610
This commit is contained in:
@@ -30,6 +30,11 @@ class phpbb_crypto_manager
|
|||||||
*/
|
*/
|
||||||
protected $type_map = false;
|
protected $type_map = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Password convert flag. Password should be converted
|
||||||
|
*/
|
||||||
|
public $convert_flag = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crypto helper
|
* Crypto helper
|
||||||
* @var phpbb_crypto_helper
|
* @var phpbb_crypto_helper
|
||||||
@@ -183,18 +188,14 @@ class phpbb_crypto_manager
|
|||||||
// Multiple hash passes needed
|
// Multiple hash passes needed
|
||||||
if (is_array($stored_hash_type))
|
if (is_array($stored_hash_type))
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->helper->check_combined_hash($password, $stored_hash_type, $hash);
|
return $this->helper->check_combined_hash($password, $stored_hash_type, $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stored_hash_type->check($password, $hash);
|
|
||||||
if ($stored_hash_type->get_type() !== $this->type)
|
if ($stored_hash_type->get_type() !== $this->type)
|
||||||
{
|
{
|
||||||
// check with "old" hash and convert to new one
|
$this->convert_flag = true;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// check with default type
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $stored_hash_type->check($password, $hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user