No implementation found to handle given hash.

During the update of a TYPO3 website from version 8 to version 9 at our web agency, the following error occurred:

component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB): Uncaught TYPO3 Exception #1234567890: No implementation found to handle given hash. This happens if the stored hash uses a mechanism not supported by current server. Follow the wiki link to fix this issue.

As a result, we were also unable to log in to the website's Install Tool via the URL /typo3/install.php. TYPO3 9 uses argon2i as its default password hashing method, but unfortunately, this was not available on the development server we were using. So, what can be done?

 

In principle, we "only" need to change the password hashing method to one that is available on the server, for example bcrypt in our case. Unfortunately, it is not sufficient to simply enter the following as the className in LocalConfiguration.php:

TYPO3\CMS\Core\Crypto\PasswordHashing\BcryptPasswordHash

Instead, the hashing settings should normally be changed in the Install Tool: go to Settings → Configuration Presets → Password hashing settings and select bcrypt. Then create a new Install Tool password and you're done.

Of course, this is somewhat difficult when we cannot log in to the Install Tool in the first place.

 

However, this problem can be worked around relatively easily by temporarily disabling the password validation in the file responsible for checking whether the entered password is correct. In this case (the TYPO3 version 9.5.19 can of course be replaced with the corresponding version), the relevant file is:

 

/typo3_src-9.5.19/typo3/sysext/install/Classes/Authentication/AuthenticationService.php

 

In this file, we temporarily change the following two lines:

 

$hashInstance = $hashFactory->get($installToolPassword, 'BE');
$validPassword = $hashInstance->checkPassword($password, $installToolPassword);

 

to:

 

// $hashInstance = $hashFactory->get($installToolPassword, 'BE');
$validPassword = 1;

 

We can then log in to the Install Tool and make the necessary changes. It is absolutely essential to immediately revert the changes made above afterward!

That's it!

Encountered at our agency while updating a website from TYPO3 8 to TYPO3 9.