Skip to content
Snippets Groups Projects
Commit 706c4ef5 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B12016passwordHasingTypo3v8NotWorking' into 'develop'

Refs #12016 : run Typo3 autoloader before password hashing if API request

See merge request !311
parents c8cadfcc f82cd36f
No related branches found
No related tags found
2 merge requests!317Develop,!311Refs #12016 : run Typo3 autoloader before password hashing if API request
Pipeline #5004 passed
...@@ -43,6 +43,7 @@ class T3Handler { ...@@ -43,6 +43,7 @@ class T3Handler {
* *
* @param string $newPassword * @param string $newPassword
* @return string * @return string
* @throws \UserFormException
*/ */
public static function getHash($newPassword) { public static function getHash($newPassword) {
...@@ -50,6 +51,7 @@ class T3Handler { ...@@ -50,6 +51,7 @@ class T3Handler {
restore_error_handler(); restore_error_handler();
$saltedPassword = null; $saltedPassword = null;
self::t3AutoloadIfNotRunning();
if (class_exists('\TYPO3\CMS\Core\Utility\GeneralUtility') if (class_exists('\TYPO3\CMS\Core\Utility\GeneralUtility')
&& class_exists('\TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory')) { && class_exists('\TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory')) {
...@@ -89,10 +91,12 @@ class T3Handler { ...@@ -89,10 +91,12 @@ class T3Handler {
* @param string $saltedPassword * @param string $saltedPassword
* @param string $password * @param string $password
* @return bool * @return bool
* @throws \UserFormException
*/ */
public static function checkPassword($saltedPassword, $password) { public static function checkPassword($saltedPassword, $password) {
$success = null; $success = null;
self::t3AutoloadIfNotRunning();
// Restore T3 ErrorHandler. T3 throws exceptions - those should be handled by T3! // Restore T3 ErrorHandler. T3 throws exceptions - those should be handled by T3!
restore_error_handler(); restore_error_handler();
...@@ -165,6 +169,7 @@ class T3Handler { ...@@ -165,6 +169,7 @@ class T3Handler {
* *
* @param $key * @param $key
* @param $value * @param $value
* @throws \UserFormException
*/ */
public static function updateT3QfqConfig($key, $value) { public static function updateT3QfqConfig($key, $value) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment