Project

General

Profile

Actions

Bug #93492

closed

FE_Login - Redirect after login error didn't work because of cookieWarning implementation

Added by Paul Kamma about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
felogin
Target version:
-
Start date:
2021-02-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
felogin
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Arne-Kolja Bachstein about 3 years ago

Confirmed. Having the same problem right now.

Actions #2

Updated by Markus Klein about 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.

Actions #3

Updated by Gerrit Code Review about 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

Actions #4

Updated by Markus Klein about 3 years ago

  • Status changed from Under Review to New

I guess I found a fix

Actions #5

Updated by Markus Klein about 3 years ago

  • Status changed from New to Under Review
Actions #6

Updated by Gerrit Code Review about 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

Actions #7

Updated by Markus Klein about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF