Redirect to TFA doesn't work with login destination modules

Created on 4 November 2024, 11 months ago

Problem/Motivation

When you have some modules like "Login And Logout Redirect Per Role", "Redirect After Login" etc, setting "Redirect users on login to TFA Setup Page" will not work.
The reason is located at 105th line of TfaLoginForm.php

            // Redirect user directly to the TFA account setup overview page.
            if ($this->getRequest()->request->has('destination')) {
              $this->getRequest()->query->remove('destination');
            }

It seems like a typo: value is checked in "request", but removed from "query"

Steps to reproduce

1. Install and Enable module Login And Logout Redirect Per Role and configure some login destination for authenticated user.
2. Set checkbox "Redirect users on login to TFA Setup Page" in TFA settings.
3. Try to log in as user without TFA.

Proposed resolution

Repair code

Remaining tasks

No

User interface changes

No

API changes

No

Data model changes

No

πŸ› Bug report
Status

Active

Version

1.9

Component

Code

Created by

πŸ‡§πŸ‡ΎBelarus gun_dose

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024