Review main Merged

67345[BUGFIX] Build correct redirect url when switching BE user

Elias Häußler CR +2 V +2 Easy +6 −2 updated 01/05/21, 23:13

Commit message

With the introduction of Backend url rewrites with #93048,
the generated redirect url to switch backend users was
broken. The redirect url is now created from the "main"
route using the UriBuilder.

Review

  • Code review CR +2 Done
    • Richard Haeser +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Richard Haeser +2
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 2

Files 1

Review log 1114

  1. Elias Häußler uploaded patch set 1 01/05/21, 21:27

  2. TYPO3com voted on patch set 1 V +1 01/05/21, 21:39 Completed build in 11m 10s on Tue, 5 Jan, 09:39 PM Test Summary: 32557 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8656

  3. Richard Haeser voted on patch set 1 V +1 CR +1 01/05/21, 21:55

  4. Oli Bartsch commented on patch set 1 01/05/21, 22:07

    Thanks for the fix. What do you think about using the UriBuilder instead of manually creating this link. We can use the "main" route for this like it's done at other places in core. See e.g. in the LoginController. So something like: $redirectUrl = (string)GeneralUtility::makeInstance(UriBuilder::class)->buildUriFromRoute( 'main', $GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] ? [] : ['commandLI' => '1'], ); throw new ImmediateResponseException(new RedirectResponse($redirectUrl, 303), 1607271592);
  5. Oli Bartsch commented on patch set 1 01/05/21, 22:14

    Reply

    Such places were the problem in the initial patch as they all build links to some entry point manually without using any configured route. See e.g. TYPO3\CMS\Backend\Routing\Router:116 where we had to check for index.php to make exactly such places still work.
  6. Elias Häußler uploaded patch set 2 01/05/21, 22:50

  7. Elias Häußler commented on patch set 2 01/05/21, 22:52

    Done
  8. TYPO3com voted on patch set 2 V +1 01/05/21, 22:59 Completed build in 09m 02s on Tue, 5 Jan, 10:59 PM Test Summary: 32557 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8660

  9. Elias Häußler uploaded patch set 3 01/05/21, 23:02

  10. Oli Bartsch voted on patch set 3 V +1 CR +1 01/05/21, 23:07

  11. Richard Haeser voted on patch set 3 V +1 CR +1 01/05/21, 23:07

  12. TYPO3com voted on patch set 3 V +1 01/05/21, 23:12 Completed build in 10m 27s on Tue, 5 Jan, 11:12 PM Test Summary: 32557 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8661

  13. Richard Haeser voted on patch set 3 V +2 CR +2 01/05/21, 23:13

  14. Richard Haeser merged patch set 4 01/05/21, 23:13