mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/passwords] Do not check if type_map is empty
If the type map is empty the service container is incomplete or broken. There is no need to check this as other components would probably be broken at the same time. PHPBB3-11610
This commit is contained in:
parent
fcb7130823
commit
8f863d1d49
1 changed files with 0 additions and 11 deletions
|
@ -75,11 +75,6 @@ class phpbb_crypto_manager
|
||||||
*/
|
*/
|
||||||
protected function fill_type_map($hashing_algorithms)
|
protected function fill_type_map($hashing_algorithms)
|
||||||
{
|
{
|
||||||
if ($this->type_map !== false)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($hashing_algorithms as $algorithm)
|
foreach ($hashing_algorithms as $algorithm)
|
||||||
{
|
{
|
||||||
if (!isset($this->type_map[$algorithm->get_prefix()]))
|
if (!isset($this->type_map[$algorithm->get_prefix()]))
|
||||||
|
@ -187,12 +182,6 @@ class phpbb_crypto_manager
|
||||||
|
|
||||||
public function check_hash($password, $hash)
|
public function check_hash($password, $hash)
|
||||||
{
|
{
|
||||||
if (!$this->type_map)
|
|
||||||
{
|
|
||||||
// This obviously shouldn't happen
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// First find out what kind of hash we're dealing with
|
// First find out what kind of hash we're dealing with
|
||||||
$stored_hash_type = $this->get_hashing_algorithm($hash);
|
$stored_hash_type = $this->get_hashing_algorithm($hash);
|
||||||
if ($stored_hash_type == false)
|
if ($stored_hash_type == false)
|
||||||
|
|
Loading…
Add table
Reference in a new issue