Review main Merged

77206[BUGFIX] Enforce validation when no cHash is given

Benni Mack CR +2 V +2 Hard +330 −3 updated 02/06/23, 16:29

Commit message

When no cHash is given but GET parameters are handed in
which _would_ require cHash parameters, these are now
properly evaluated during the frontend request.

As this has a security impact,
a new option called
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['enforceValidation']
is introduced, which then skips
the "requireCacheHashPresenceParameters" option.
The latter is an include list, but cache Hash
calculation should rather be based on
the exclude list such as "excludedParameters" and
"cachedParametersWhiteList".

If the new option is set, but some properties such
as tx_solr[q] should be allowed, then this needs
to be added to the excludedList ("excludedParameters")
by extension authors.

A new test "SlugSiteWithoutRequiredCHashRequestTest"
is added which works with a disabled feature
flag compared to "SlugSiteRequestTest" which
has the feature flag enabled.

Review

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

Issues 1

Files 19

Review log 2744

Show 1119 earlier messages
  1. Benni Mack uploaded patch set 1 12/23/22, 11:23

  2. Benni Mack uploaded patch set 2 12/23/22, 11:24

  3. core-ci voted on patch set 1 V -1 12/23/22, 11:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35326

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

  5. Benni Mack uploaded patch set 3 V -1 01/09/23, 14:00

  6. core-ci voted on patch set 3 V -1 01/09/23, 14:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35605

  7. Benni Mack uploaded patch set 4 V -1 01/09/23, 14:17

  8. core-ci voted on patch set 4 V -1 01/09/23, 14:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35606

  9. Benni Mack uploaded patch set 5 V -1 01/09/23, 14:41

  10. core-ci voted on patch set 5 V -1 01/09/23, 14:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35607

  11. Benni Mack uploaded patch set 6 V -1 01/09/23, 16:00

  12. core-ci voted on patch set 6 V -1 01/09/23, 16:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35610

  13. Benni Mack uploaded patch set 7 V -1 01/09/23, 18:59

  14. core-ci voted on patch set 7 V -1 01/09/23, 19:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35613

  15. Oliver Hader uploaded patch set 8 V -1 01/09/23, 20:44

  16. Oliver Hader commented on patch set 8 01/09/23, 20:48

    PageArgumentValidator.php:182

    The `elseif` part was the problem... in case `enforceValidation` was enabled, but not relevant parameters found, the remaining required parameters were not evaluated anymore.
  17. Oliver Hader commented on patch set 8 01/09/23, 20:49

    PageArgumentValidator.php:182 Reply

    Ack
  18. core-ci voted on patch set 8 V -1 01/09/23, 20:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35616

  19. Oliver Hader uploaded patch set 9 V -1 01/09/23, 20:58

  1. Oliver Hader uploaded patch set 10 01/09/23, 21:08

  2. core-ci voted on patch set 9 V -1 01/09/23, 21:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35617

  3. core-ci voted on patch set 10 V -1 01/09/23, 21:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35618

  4. Oliver Hader uploaded patch set 11 V -1 01/09/23, 21:25

  5. core-ci voted on patch set 11 V +1 01/09/23, 21:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35619

  6. Benni Mack uploaded patch set 12 V +1 01/09/23, 22:35

  7. core-ci voted on patch set 12 V +1 01/09/23, 22:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35620

  8. Markus Klein commented on patch set 12 01/10/23, 08:11

    That's not making much sense. I *think* you meant: > When no cHash is given but GET parameters are handed in which _would_ require a cHash parameter
  9. Benni Mack uploaded patch set 13 V +1 01/23/23, 22:21

  10. Benni Mack updated the commit message in patch set 14 01/23/23, 22:22

  11. core-ci voted on patch set 13 V +1 01/23/23, 22:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36498

  12. core-ci voted on patch set 14 V +1 01/23/23, 22:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36499

  13. Benni Mack commented on patch set 14 01/23/23, 22:34

    Reply

    Done
  14. Benni Mack uploaded patch set 15 V +1 01/27/23, 08:59

  15. core-ci voted on patch set 15 V +1 01/27/23, 09:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36677

  16. Oli Bartsch uploaded patch set 16 V +1 01/27/23, 10:47

  17. Oli Bartsch voted on patch set 16 V +1 CR +1 01/27/23, 10:47

  18. core-ci voted on patch set 16 V +1 01/27/23, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36686

  19. Oliver Hader voted on patch set 16 V +1 CR +1 02/06/23, 14:52

  20. Oliver Hader updated the commit message in patch set 17 CR +1 V +1 02/06/23, 15:48

  21. Oliver Hader voted on patch set 17 V +1 CR +1 02/06/23, 15:49

  22. Oli Bartsch voted on patch set 17 V +1 CR +1 02/06/23, 16:13

  23. core-ci voted on patch set 17 V +1 02/06/23, 16:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37180

  24. Oliver Hader voted on patch set 17 V +2 CR +2 02/06/23, 16:29

  25. Oliver Hader merged patch set 18 02/06/23, 16:29