[BUGFIX] Registration fails with exception in getDefaultHashInstance 43/58943/2 master v6.0.2
authorStanislas Rolland <typo3@sjbr.ca>
Sat, 24 Nov 2018 17:14:28 +0000 (12:14 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 27 Nov 2018 03:05:01 +0000 (04:05 +0100)
PasswordHashFactory must be instantiated.

Resolves: #86942
Change-Id: I983f6eda133818d4de3118b550a4a105fb18cd42
Reviewed-on: https://review.typo3.org/58943
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
ChangeLog
Classes/Security/StorageSecurity.php
composer.json
ext_emconf.php

index f467cab..f678d7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
 2018-11-03 Stanislas Rolland  <typo3(arobas)sjbr.ca>
+       * Resolves #86942: New subscription fails with exception in getDefaultHashInstance
+       * Update version to 6.0.2
+
+2018-11-03 Stanislas Rolland  <typo3(arobas)sjbr.ca>
        * Resolves #86832: Table 'cache_md5params' doesn't exist
        * Update version to 6.0.1
 
index 5f91cae..0f70c37 100644 (file)
@@ -27,6 +27,7 @@ use SJBR\SrFeuserRegister\Utility\LocalizationUtility;
 use TYPO3\CMS\Core\Log\LogManager;
 use TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Rsaauth\Backend\BackendFactory;
 
 /**
@@ -49,7 +50,9 @@ class StorageSecurity
        {
                $encryptedPassword = $password;
                if ($password != '') {
-                       $objSalt = PasswordHashFactory::getDefaultHashInstance('FE');
+                       $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
+                       $hashFactory = $objectManager->get(PasswordHashFactory::class);
+                       $objSalt = $hashFactory->getDefaultHashInstance('FE');
                        if (is_object($objSalt)) {
                                $encryptedPassword = $objSalt->getHashedPassword($password);
                        } else {
index 51f43ce..6909b5b 100644 (file)
@@ -2,7 +2,7 @@
   "name": "sjbr/sr-feuser-register",
   "description": "A self-registration variant of Kasper Skårhøj's Front End User Admin extension.",
   "type": "typo3-cms-extension",
-  "version": "6.0.1",
+  "version": "6.0.2",
   "license": "GPL-2.0+",
   "keywords": [
     "TYPO3",
index b8e399c..ae6e64c 100644 (file)
@@ -16,7 +16,7 @@ $EM_CONF[$_EXTKEY] = [
        'author' => 'Stanislas Rolland',
        'author_email' => 'typo3@sjbr.ca',
        'author_company' => 'SJBR',
-       'version' => '6.0.1',
+       'version' => '6.0.2',
        'constraints' => [
                'depends' => [
                        'typo3' => '9.5.0-9.5.99',