Bug #95119
closedEpic #92636: felogin bug collection
checkFeUserPid = false prevents correct password reset function
100%
Description
Problem¶
Setting the $GLOBALS['TYPO3_CONF_VARS']['FE']['checkFeUserPid'] = false prevents correct password reset function.
No recover mail is sent to the user, if the fe_users record has a pid different than 0.
Reason¶
Because of the return value [0] inside TYPO3\CMS\FrontendLogin\Controller\AbstractLoginFormController::getStorageFolders (line 32-34)
if ((bool)($GLOBALS['TYPO3_CONF_VARS']['FE']['checkFeUserPid'] ?? false) === false) { return [0]; }
this condition inside TYPO3\CMS\FrontendLogin\Domain\Repository\FrontendUserRepository::findEmailByUsernameOrEmailOnPages (line 182-185) becomes true, because !empty([0]) === true
if (!empty($pages)) { // respect storage pid $query->andWhere($queryBuilder->expr()->in('pid', $pages)); }
Subsequently a check for the pid 0 is added, which ends in a empty result if the pid of a user is different of 0.
This in turn bypass the sendRecoveryEmail call inside TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::recoveryAction (line 87-89):
if ($email) { $this->recoveryService->sendRecoveryEmail($email); }
Possible solution¶
Changing line 32-34 of TYPO3\CMS\FrontendLogin\Controller\AbstractLoginFormController to this, solves the problem:
if ((bool)($GLOBALS['TYPO3_CONF_VARS']['FE']['checkFeUserPid'] ?? false) === false) { return []; }
Updated by S P about 3 years ago
- Related to Epic #92636: felogin bug collection added
Updated by Gerrit Code Review about 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76764
Updated by Gerrit Code Review about 2 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76772
Updated by Markus Klein about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7bf3baa7a31daff543f8edb24c3a63b5c5fe3c8c.
Updated by Gerrit Code Review about 2 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76773
Updated by Markus Klein about 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 550c250fb34670ec6623810c9a1901e5f5f831a8.
Updated by Benni Mack almost 2 years ago
- Status changed from Resolved to Closed