Review main Merged

92454[BUGFIX] Avoid login redirects in ajax requests

Benjamin Franzke CR +2 V +2 Easy +30 −17 updated 01/30/26, 18:40

Commit message

Redirecting to the /login route in ajax requests are problematic
for several reasons:

 * if the action expected HTML, it will use the resulting login HTML (or
   after a relogin in another tab, backend HTML) and insert it into
   existing HTML elements, causing login/backend in backend rendering
   for example in the shortcuts menu, opendocs menu, livesearch modal,
   and so on…
 * if the action expected JSON, it will cause a JavaScript error

Roll out the fix for #107894 (and revert the previous workaround)
for all ajax actions.

We'll ideally need to inform the user and offer a relogin,
but that's up for a later change.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 710

  1. Benjamin Franzke uploaded patch set 1 01/22/26, 08:47

  2. core-ci voted on patch set 1 V +1 01/22/26, 08:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94021

  3. Benjamin Franzke uploaded patch set 2 V +1 01/23/26, 07:59

  4. core-ci voted on patch set 2 V +1 01/23/26, 08:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94138

  5. Benjamin Franzke updated the commit message in patch set 3 V +1 01/23/26, 08:14

  6. core-ci voted on patch set 3 V +1 01/23/26, 08:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94139

  7. Garvin Hicking commented on patch set 3 CR +1 V +1 01/25/26, 00:44

    I tried a few things and investigated public and custom project extensions to see if anything might have done fancy code that would "react" with javascript ajax actions on a login screen embedded within ajax actions. The more I dove into that it became clear to me that IF someone would do that, that would be doomed and needs to be broken, and it was just my paranoia acting out. Luckily, I did not find any code that did that, checked: https://github.com/miniOrangeDev/typo3-oidc-free https://github.com/xperseguers/t3ext-ig_ldap_sso_auth https://github.com/derhansen/sf_yubikey https://github.com/marketing-factory/oauth2 To reproduce the problem that this patch fixes: * Have two tabs with the same TYPO3 backend * in tab 2, log out * back again in tab 1, open livesearch * you'll then see the login screen inside the live search * a login there actually returns an error and then breaks out the frameset with a top reload I think the 401 response with the fix applied is fair for now. Modal alert would be nicer, but would require some whole new template.
  8. Andreas Kienast voted on patch set 3 CR +1 V +1 01/30/26, 15:13

  9. Benjamin Franzke voted on patch set 3 CR +2 V +2 01/30/26, 18:40

  10. Benjamin Franzke merged patch set 4 01/30/26, 18:40