From 8795fe9c77d634cb99d6f1f30a0022a6ba972785 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 15 Jun 2013 12:10:56 +0200 Subject: [PATCH] [feature/passwords] Add convert flag for converting to default PHPBB3-11610 --- phpBB/includes/crypto/manager.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/crypto/manager.php b/phpBB/includes/crypto/manager.php index 2647836cc8..1f6ba78666 100644 --- a/phpBB/includes/crypto/manager.php +++ b/phpBB/includes/crypto/manager.php @@ -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); } }