Actions
Bug #100704
closedFrontEnd MfaProviderPropertyManager storeProperties fails if no logger available
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Authentication
Target version:
-
Start date:
2023-04-21
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
I'm using the Typo3 providers for TOTP in frontend.
MfaProviderPropertyManager function storeProperties fails in frontend without logger. Data is stored!
protected function storeProperties(): bool
{
// encode the mfa properties to store them in the database and the user array
$mfa = json_encode($this->mfa, JSON_THROW_ON_ERROR) ?: '';
// Write back the updated mfa properties to the user array
$this->user->user[self::DATABASE_FIELD_NAME] = $mfa;
// Log MFA update
$this->logger->debug('MFA properties updated', [
'provider' => $this->providerIdentifier,
'user' => [
'uid' => $this->user->user[$this->user->userid_column],
'username' => $this->user->user[$this->user->username_column],
],
]);
// Store updated mfa properties in the database
return (bool)GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($this->user->user_table)->update(
$this->user->user_table,
[self::DATABASE_FIELD_NAME => $mfa],
[$this->user->userid_column => (int)$this->user->user[$this->user->userid_column]],
[self::DATABASE_FIELD_NAME => Connection::PARAM_LOB]
);
}
Failure near //Log MFA update
Both typo3 11 and 12
Actions