Review main Merged

86142[BUGFIX] Do not exceed `PHP_INT_MAX` in `CacheTimeout` middleware

Andreas Kienast CR +2 V +2 Easy +1 −1 updated 09/17/24, 15:27

Commit message

If the TypoScript configuration `config.cache_clearAtMidnight` is
enabled, the `CacheTimeout` middleware is executed. If
`CDC->resolveLifetime()` returns `PHP_INT_MAX`, the timeout calculation
may cause an overflow, leading to a float value being passed to
`date()`. To circumvent this issue, the value may now not be larger
than `PHP_INT_VALUE` anymore.

Review

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

Issues 2

Files 1

Review log 89

  1. Andreas Kienast uploaded patch set 1 09/17/24, 12:35

  2. Christian Kuhn commented on patch set 1 CR +1 09/17/24, 12:39

    nasty. +1 on reading already. will have a closer look soon.
  3. core-ci voted on patch set 1 V +1 09/17/24, 13:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66009

  4. Christian Kuhn voted on patch set 1 V +1 09/17/24, 14:29

  5. Garvin Hicking commented on patch set 1 09/17/24, 14:53

    Good cache. 😏 Having such a maximum cache entry though, could it lead to proxies/cdns receiving a stamp too far in the future? Should it be reduced to something like "30 days" or so instead? Or calculate the real timestamp for "midnight"?
  6. Christian Kuhn commented on patch set 1 09/17/24, 15:08

    Reply

    i think we should rather get rid of (deprecate) clear_cacheAtMidnight altogether as stated in the todo, and keep the code itself as b/w compatible as possible until then.
  7. Garvin Hicking voted on patch set 1 CR +1 V +1 09/17/24, 15:20

  8. Andreas Kienast voted on patch set 1 CR +2 V +2 09/17/24, 15:27

  9. Andreas Kienast merged patch set 2 09/17/24, 15:27