mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/passwords] Add convert flag for converting to default
PHPBB3-11610
This commit is contained in:
parent
d3d317a2de
commit
8795fe9c77
1 changed files with 8 additions and 7 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue