#107472FE-Login in second Browser-Tab yield inconsistent Userstate and Login-Error
Description
- fe_user are located on any sys_folder
- $GLOBALS[‘TYPO3_CONF_VARS’][‘FE’][‘checkFeUserPid’] = true
- Page with fe-login-Plugin
- Login page opened in two browser tabs
- in first browser tab do a login with username and password
- do the same login in second tab afterward
- Login-Error is displayed
If $GLOBALS[‘TYPO3_CONF_VARS’][‘FE’][‘checkFeUserPid’] = false is used,
no error is displayed
In this case even wrong password or inexistend user yield same result
Reason for Login-Error:
@AbstractUserAuthentication::fetchValidUserFromSessionOrDestroySession();@, which relys on $checkPid_value, is executed before
@BeforeRequestTokenProcessedEvent@ has been dispatched.
@\TYPO3\CMS\FrontendLogin\Event\ProcessRequestTokenListener@ sets `$checkPid_value` to late.
Deeper in middleware-stack the frontend-user is not logged in, while its session has a user id:
@frontendUser->getSession()->getUserId() !== $frontendUser->getUserId()@
It would be nice , if both configuration variants yield same behavior.
Users getting this type of login error, try to change password and run in same problem again.
How could it be possible, to detect and handle the “new login while already authenticated”-condition and inform the user about the mistake?
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] FE-Login in second Browser-Tab yield inconsistent Userstate and Login-Error Resolves: #107472 Releases: main