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

[feature/passwords] Add convert flag for converting to default

PHPBB3-11610
This commit is contained in:
Marc Alexander 2013-06-15 12:10:56 +02:00
parent d3d317a2de
commit 8795fe9c77

View File

@ -30,6 +30,11 @@ class phpbb_crypto_manager
*/
protected $type_map = false;
/**
* Password convert flag. Password should be converted
*/
public $convert_flag = false;
/**
* Crypto helper
* @var phpbb_crypto_helper
@ -183,18 +188,14 @@ class phpbb_crypto_manager
// Multiple hash passes needed
if (is_array($stored_hash_type))
{
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)
{
// check with "old" hash and convert to new one
}
else
{
// check with default type
$this->convert_flag = true;
}
return $stored_hash_type->check($password, $hash);
}
}