Review main Merged

83083[BUGFIX] Prevent PHP deprecation in getCookieName()

Oli Bartsch CR +2 V +2 Easy +7 −18 updated 02/23/24, 13:07

Commit message

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1215

  1. Oli Bartsch uploaded patch set 1 02/23/24, 09:27

  2. core-ci voted on patch set 1 V +1 02/23/24, 09:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53464

  3. Oliver Klee commented on patch set 1 02/23/24, 09:48

    FrontendUserAuthentication.php:171

    The `?:` checks the value for truthiness. I suggest using a string comparison instead as we actually want to check for an nonempty string, not a boolean value, and the code can communicate this explicitly. (This would also avoid the nested `??` and `?:` operators.) ```php $configuredCookieName = trim((string)($GLOBALS['TYPO3_CONF_VARS']['FE']['cookieName'] ?? '')) if ($configuredCookieName === '') { $configuredCookieName = 'fe_typo_user'; } return $configuredCookieName; } ```
  4. Oliver Klee commented on patch set 1 02/23/24, 09:48

    Also, is 11.5 affected as well?
  5. Benni Mack commented on patch set 1 02/23/24, 09:56

    don't we have the same problem in BackendUserAuthentication::getCookieName() ?
  6. Oli Bartsch uploaded patch set 2 V +1 02/23/24, 10:11

  7. Oli Bartsch commented on patch set 2 02/23/24, 10:11

    Reply

    Yes, adjusted this method, too.

    Reply

    Might be. However, i don't see this as a priority bugfix.

    FrontendUserAuthentication.php:171 Reply

    Changed to string comparison.
  8. core-ci voted on patch set 2 V -1 02/23/24, 10:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53470

  9. Oliver Klee voted on patch set 2 CR +1 02/23/24, 10:26

  10. Oli Bartsch uploaded patch set 3 CR +1 V -1 02/23/24, 10:35

  11. core-ci voted on patch set 3 V +1 02/23/24, 10:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53472

  12. Andreas Kienast voted on patch set 3 CR +1 V +1 02/23/24, 10:51

  13. Oliver Klee voted on patch set 3 CR +1 V +1 02/23/24, 10:59

  14. Oli Bartsch voted on patch set 3 CR +2 V +2 02/23/24, 13:07

  15. Oli Bartsch merged patch set 4 02/23/24, 13:07