Bug #93492
closedFE_Login - Redirect after login error didn't work because of cookieWarning implementation
100%
Description
When a redirect on login error is setted the redirect didnt work.
I peeked inside the code and found this part where he leaves before he can redirect the user.
sysext/felogin/Classes/Controller/LoginController.php at line 117
public function initializeAction(): void
{
$this->loginType = (string)$this->requestHandler->getPropertyFromGetAndPost('logintype');
$this->configuration = RedirectConfiguration::fromSettings($this->settings);
if ($this->isLoginOrLogoutInProgress() && !$this->isRedirectDisabled()) {
if (!$this->userAspect->isLoggedIn() && $this->userService->cookieWarningRequired()) {
$this->showCookieWarning = true;
// THIS RETURN PREVENTS THAT IT CONTINUES TO THE REDIRECT
// WHEN I REMOVE IT IT WORKS
return;
}
$this->redirectUrl = $this->redirectHandler->processRedirect(
$this->loginType,
$this->configuration,
$this->request->hasArgument('redirectReferrer') ? $this->request->getArgument('redirectReferrer') : ''
);
}
}
Maybe the return have to be removed.
Updated by Arne-Kolja Bachstein over 3 years ago
Confirmed. Having the same problem right now.
Updated by Markus Klein over 3 years ago
The cookie warning seems to be broken beyond repair.
It also shows up if the user simply misstyped the password, because it lacks a check whether the login was actually successful.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68334
Updated by Markus Klein over 3 years ago
- Status changed from Under Review to New
I guess I found a fix
Updated by Markus Klein over 3 years ago
- Status changed from New to Under Review
Updated by Gerrit Code Review over 3 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/+/68331
Updated by Markus Klein over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9b1b65ad4371bdd91ad17af2dbbeda22403a48d5.