Review main Merged

78923[BUGFIX] Create session cookie when explicitly requested

Oliver Hader CR +2 V +2 Easy +20 −10 updated 05/03/23, 08:03

Commit message

The fix for issue #100695 reorganized the logic for setting
new cookies. However, the assumption - to only set a cookie
when the class property `$dontSetCookie` is disabled or a
permanent cookie is used - is wrong.

Previous TYPO3 versions were issuing new cookies, when
`AbstractUserAuthentication::setSessionCookie()` was invoked.
This change restores the previous behavior.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Thomas Hohn +1
    • Markus Klein +1
    • Daniel Haupt +1
  • Verified V +2 Done
    • Benni Mack +2
    • Daniel Haupt +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 67

  1. Oliver Hader uploaded patch set 1 05/02/23, 18:43

  2. Markus Klein voted on patch set 1 CR +1 05/02/23, 18:50

  3. core-ci voted on patch set 1 V +1 05/02/23, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41363

  4. Thomas Hohn voted on patch set 1 CR +1 05/02/23, 19:01

  5. Daniel Haupt commented on patch set 1 V +1 CR +1 05/03/23, 07:04

    The issue could also be fixed by simply adding `$this->dontSetCookie = false;` before calling `setSessionCookie()` in `\TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication:440`. But I guess the change is fine, since the method `setSessionCookie` is public API. However, I can confirm the fix is working when using `$GLOBALS['TSFE']->fe_user->setKey()`.
  6. Benni Mack voted on patch set 1 V +2 CR +2 05/03/23, 07:54

  7. Oliver Hader merged patch set 2 05/03/23, 08:03