1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

[feature/passwords] Integrate convert_flag with db auth provider

PHPBB3-11610
This commit is contained in:
Marc Alexander
2013-10-25 15:21:09 +02:00
parent 87bd628241
commit bb836b65e3
5 changed files with 27 additions and 5 deletions

View File

@@ -245,7 +245,7 @@ class db extends \phpbb\auth\provider\base
if (!$row['user_pass_convert'] && $this->passwords_manager->check($password, $row['user_password']))
{
// Check for old password hash...
if (strlen($row['user_password']) == 32)
if ($this->passwords_manager->convert_flag || strlen($row['user_password']) == 32)
{
$hash = $this->passwords_manager->hash($password);

View File

@@ -243,7 +243,9 @@ class manager
// Multiple hash passes needed
if (is_array($stored_hash_type))
{
return $this->helper->check_combined_hash($password, $stored_hash_type, $hash);
$correct = $this->helper->check_combined_hash($password, $stored_hash_type, $hash);
$this->convert_flag = ($correct === true) ? true : false;
return $correct;
}
if ($stored_hash_type->get_name() !== $this->type)