Review main Merged

81840[BUGFIX] Use config.sendCacheHeaders only for cacheable content

Benni Mack CR +2 V +2 Easy +14 −24 updated 11/30/23, 13:03

Commit message

This changes the behaviour of config.sendCacheHeaders = 1.

When a non-cacheable option is used, the HTTP Response
Headers for ensuring that a response should never
be cached (that is Cache-Control: private, no-store)
should be sent at any time, as it could contain
sensitive information, regardless of the TypoScript option.

The TypoScript option config.sendCacheHeaders is
then only used to actually explicitly send the headers
for a fully client-cacheable page (e.g. for a proxy), to
explicitly allow the cached content to be stored
for a defined amount of time.

In addition, a lot of tests have been adapted to
remove this option as it does not have any effect
in the tests if the option is set.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Jörg Bösche +1
    • Sascha Nowak +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Sascha Nowak +1
    • core-ci +1 CI

Issues 1

Files 13

Review log 1519

  1. Benni Mack uploaded patch set 1 11/22/23, 11:46

  2. core-ci voted on patch set 1 V -1 11/22/23, 11:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49339

  3. Benni Mack commented on patch set 2 V -1 11/22/23, 11:55

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V +1 11/22/23, 12:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49342

  5. Oli Bartsch updated the commit message in patch set 3 V +1 11/22/23, 14:30

  6. Oli Bartsch voted on patch set 3 CR +1 V +1 11/22/23, 14:30

  7. core-ci voted on patch set 3 V +1 11/22/23, 14:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49362

  8. Sascha Nowak commented on patch set 3 CR +1 11/23/23, 08:15

    ## Current behavior | isClientCachable | sendCacheHeaders | expose Headers | Cache-Control | |------------------|------------------|----------------|-------------------| | true | true | true | max-age | | false | true | true | private, no-store | | false | false | true | ----- | | true | false | false | ----- | ## New behavior | isClientCachable | sendCacheHeaders | expose Headers | Cache-Control | |------------------|------------------|----------------|-------------------| | true | true | true | max-age | | false | true | true | private, no-store | | false | false | true | private, no-store | | true | false | false | ----- |
  9. Benjamin Franzke commented on patch set 3 11/23/23, 08:30

    I'd like to know/see whether 12.4 could be an option. I mean, can we identify any cases like caching proxies or alike, that could fail with this. Also: EXT:proxycachemanager (not yet 12 compatible) EXT:varnish EXT:nginx_cache EXT:staticfilecache
  10. Sascha Nowak commented on patch set 3 11/23/23, 08:38

    Reply

    Our EXT:nxvarnish (https://github.com/netlogix/nxvarnish) is compatible with this patch. The behaviour of the setting sendCacheHeaders doesn't change.
  11. Benni Mack commented on patch set 3 11/23/23, 09:54

    Reply

    same with proxycachemanager.
  12. Benjamin Franzke voted on patch set 3 CR +1 11/30/23, 12:28

  13. Benni Mack updated the commit message in patch set 4 CR +1 V +1 11/30/23, 12:32

  14. core-ci voted on patch set 4 V +1 11/30/23, 12:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50164

  15. Jörg Bösche voted on patch set 4 CR +1 11/30/23, 12:41

  16. Benjamin Franzke voted on patch set 4 CR +1 V +1 11/30/23, 13:01

  17. Sascha Nowak voted on patch set 4 CR +1 V +1 11/30/23, 13:02

  18. Benni Mack commented on patch set 4 CR +2 V +2 11/30/23, 13:03

    Reply

    Done
  19. Benni Mack merged patch set 5 11/30/23, 13:03