Review main Merged

60296[BUGFIX] Respect cacheHash excludedParameters in TSFE::reqCHash()

Grigory Rechkin CR +2 V +2 Normal +85 −0 updated 11/09/19, 08:41

Commit message

* Requests with a parameter from "excludedParameters" settings
  will not raise a cHash comparison error
* Requests with configured enhancers will not raise the
  "Page ID is missing" error when used with additional parameters

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Susi Moog +1
  • Verified V +2 Done
    • Benni Mack +2
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 5073

Show 3448 earlier messages
  1. Grigory Rechkin uploaded patch set 1 03/18/19, 12:32

  2. TYPO3com voted on patch set 1 V -1 03/18/19, 12:32 Completed build in 12s on Mon, 18 Mar, 01:32 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32832

  3. Grigory Rechkin updated the commit message in patch set 2 03/18/19, 12:39

  4. TYPO3com voted on patch set 2 V -1 03/18/19, 12:40 Completed build in 11s on Mon, 18 Mar, 01:40 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32833

  5. Grigory Rechkin updated the commit message in patch set 3 03/18/19, 12:40

  6. TYPO3com voted on patch set 3 V -1 03/18/19, 12:40 Completed build in 12s on Mon, 18 Mar, 01:40 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32834

  7. Grigory Rechkin commented on patch set 4 03/18/19, 13:10

    Published edit on patch set 3.
  8. TYPO3com voted on patch set 4 V -1 03/18/19, 13:11 Completed build in 16s on Mon, 18 Mar, 02:11 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32835

  9. Grigory Rechkin updated the commit message in patch set 5 03/18/19, 13:12

  10. TYPO3com voted on patch set 5 V -1 03/18/19, 13:12 Completed build in 11s on Mon, 18 Mar, 02:12 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32836

  11. Grigory Rechkin updated the commit message in patch set 6 03/18/19, 13:14

  12. TYPO3com voted on patch set 6 V -1 03/18/19, 13:15 Completed build in 14s on Mon, 18 Mar, 02:15 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32837

  13. Oliver Klee commented on patch set 6 CR -1 03/18/19, 13:59

    And can we also please have tests for the changes to CacheHashCalculator.php?

    CacheHashCalculator.php:120

    Can we please have two separate, well-named methods for this (where one makes use of the other)? This would allow us to have a well-defined parameter type.
  14. Grigory Rechkin uploaded patch set 7 03/18/19, 15:26

  15. TYPO3com voted on patch set 7 V -1 03/18/19, 15:26 Completed build in 12s on Mon, 18 Mar, 04:26 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32840

  16. Grigory Rechkin commented on patch set 6 03/18/19, 15:28

    > Patch Set 6: Code-Review-1 > > (1 comment) > > And can we also please have tests for the changes to CacheHashCalculator.php? Sure, I have separated the method and added a test for a new part
  17. Grigory Rechkin commented on patch set 7 03/18/19, 15:33

    > Patch Set 6: > > > Patch Set 6: Code-Review-1 > > > > (1 comment) > > > > And can we also please have tests for the changes to CacheHashCalculator.php? > > Sure, I have separated the method and added a test for a new part I'm Sorry but I have to ask what should I do to make the tests visible? That's my first contribution and I'm kinda lost here
  18. Björn Steinbrink commented on patch set 7 03/19/19, 10:27

    TypoScriptFrontendController.php:1565 Unresolved

    There's already an instance of this class as `$this->cacheHash`

    CacheHashCalculator.php:132

    Looks cleaner if this was written in form of a guard clause as well, i.e. simply continue if the string is empty. That also avoid raising the nesting level.
  19. Grigory Rechkin uploaded patch set 8 03/19/19, 11:42

  20. TYPO3com voted on patch set 8 V -1 03/19/19, 11:43 Completed build in 15s on Tue, 19 Mar, 12:43 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32852

  21. Björn Steinbrink commented on patch set 8 03/19/19, 11:56

    CacheHashCalculator.php:132 Reply

    Done
  22. Grigory Rechkin uploaded patch set 9 03/19/19, 13:46

  23. TYPO3com voted on patch set 9 V -1 03/19/19, 13:46 Completed build in 16s on Tue, 19 Mar, 02:46 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32855

  24. Grigory Rechkin uploaded patch set 10 03/19/19, 14:15

  25. TYPO3com voted on patch set 10 V +1 03/19/19, 14:30 Completed build in 14m 54s on Tue, 19 Mar, 03:30 PM Test Summary: 47257 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32856

  26. Chris Müller voted on patch set 10 V +1 CR +1 04/09/19, 08:34

  27. Alexey Gafiulov voted on patch set 10 V +1 CR +1 04/11/19, 10:10

  28. Georg Ringer uploaded patch set 11 04/24/19, 10:44

  29. Georg Ringer voted on patch set 11 V +1 CR +1 04/24/19, 10:44

  30. TYPO3com voted on patch set 11 V +1 04/24/19, 10:58 Completed build in 13m 36s on Wed, 24 Apr, 12:58 PM Test Summary: 47525 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33379

  31. Jonas Eberle commented on patch set 11 V +1 05/16/19, 15:14

    Verified for routeEnhancer of type Simple & Extbase. Triggers "Request parameters could not be validated" and takes into account excludedParameters. * master * 9.5: (merge is straightforward) Notice for both branches: For routes without routeEnhancers, additional parameters do not trigger a 404 (but that behaviour was not changed by this patch; it was like that before, too).
  32. Alexey Gafiulov voted on patch set 11 V +1 CR +1 05/16/19, 15:20

  33. Benni Mack uploaded patch set 12 05/22/19, 20:34

  34. TYPO3com voted on patch set 12 V -1 05/22/19, 20:48 Completed build in 13m 43s on Wed, 22 May, 10:48 PM Test Summary: 46445 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33975

  35. Benni Mack uploaded patch set 13 05/22/19, 21:24

  36. TYPO3com voted on patch set 13 V +1 05/22/19, 21:35 Completed build in 10m 34s on Wed, 22 May, 11:35 PM Test Summary: 46445 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33976

  37. Jonas Eberle commented on patch set 13 V -1 05/23/19, 15:43

    Verified for master at least for the non-cached rendering off a route segment. But I think there is still something fishy going on with cached results. I don't know if it is in the scope of this patch. Extbase-routeEnhancer on /c: 1) clear cache 2) /c?lala=1 -> cHash validation failed (as expected) 3) /c?fbclid=1 -> cHash validation failed 4) clear cache 5) /c?fbclid=1 -> OK (as expected) 6) /c?lala=1 -> OK
  38. Benni Mack commented on patch set 13 05/23/19, 22:06

    Hey Jonas, yes, I agree. I didn't change any "Logic" really compared to the old patch set. However, it would be great to get more scenarios so we can add tests to the SiteHandling functionals (as there are already cHash tests)
  39. Jonas Eberle commented on patch set 13 V 0 06/12/19, 23:25

    I probably got derailed by that problem with caching. I mean that the first result (error or ok) on a route is cached and gets output no matter which parameters are used later. I looked around in the code but couldn't find a fix. I don't understand much of that caching code, but I think that everything with cHash anywhere should use the same method to find relevant parameters filterRelevantParametersFromPageArguments(). This looks promising \TYPO3\CMS\Frontend\Middleware\PageArgumentValidator::evaluateCacheHashParameter() But that behaviour was there before this patch. I can verify that it works as expected for the uncached case.
  40. Jonas Eberle commented on patch set 13 06/12/19, 23:28

    Benni, regarding the tests: I think they are adequate for this patch.
  41. Jonas Eberle commented on patch set 13 CR +1 07/16/19, 19:49

    I backported and applied it to a v9. ?utm_source etc. are working. URLs that should throw a cHash error only throw in non-cached state. Anyway, it would be an improvement to have ?utm_source etc. working. How can we move forward?
  42. Oliver Klee commented on patch set 13 07/16/19, 21:05

    CacheHashCalculator.php:150 Unresolved

    : array

    TypoScriptFrontendControllerTest.php:509 Unresolved

    : array

    TypoScriptFrontendControllerTest.php:568 Unresolved

    : void

    CacheHashCalculatorTest.php:129 Unresolved

    : void

    CacheHashCalculatorTest.php:139 Unresolved

    : array
  43. Helmut Hummel commented on patch set 13 V -1 CR -1 08/29/19, 13:03

    Thanks for the change. Indeed relevant parameters need to be checked in reqChash to avoid a 404. However the current implementation does not work for array arguments

    CacheHashCalculator.php:150 Unresolved

    That is basically a duplication of getRelevantParameters

    CacheHashCalculator.php:153 Unresolved

    This won't work with array arguments like foo[bar]=1 in case they are excluded in configuration
  44. Helmut Hummel uploaded patch set 14 08/29/19, 14:03

  45. Helmut Hummel commented on patch set 14 08/29/19, 14:05

    rebased, reworked, simplified and fixed
  46. Helmut Hummel voted on patch set 14 V +1 CR +1 08/29/19, 14:05

  47. Helmut Hummel uploaded patch set 15 08/29/19, 14:05

  48. TYPO3com voted on patch set 14 V -1 08/29/19, 14:15 Completed build in 11m 41s on Thu, 29 Aug, 02:15 PM Test Summary: 47022 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35927

  1. TYPO3com voted on patch set 15 V +1 08/29/19, 14:15 Completed build in 10m 14s on Thu, 29 Aug, 02:15 PM Test Summary: 47268 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35928

  2. Benjamin Franzke updated the commit message in patch set 16 08/29/19, 14:23

  3. TYPO3com voted on patch set 16 V +1 08/29/19, 14:34 Completed build in 10m 36s on Thu, 29 Aug, 02:34 PM Test Summary: 47268 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35930

  4. Markus Klein voted on patch set 16 CR +1 08/29/19, 15:11

  5. Alexander Opitz commented on patch set 16 V +1 CR +1 09/23/19, 12:14

    Tested with 10 and tried as backport on a running 9.5.8 system.
  6. Benni Mack uploaded patch set 17 09/23/19, 13:39

  7. TYPO3com voted on patch set 17 V -1 09/23/19, 14:02 Completed build in 15m 26s on Mon, 23 Sep, 02:02 PM Test Summary: 4 of 48126 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36685

  8. Benni Mack uploaded patch set 18 09/24/19, 08:33

  9. TYPO3com voted on patch set 18 V -1 09/24/19, 08:44 Completed build in 10m 16s on Tue, 24 Sep, 08:44 AM Test Summary: 47827 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36722

  10. TYPO3com voted on patch set 18 V +1 09/24/19, 08:50 Completed build in 26m 23s on Tue, 24 Sep, 08:50 AM Test Summary: 47839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36722

  11. Markus Klein commented on patch set 18 09/24/19, 09:58

    CacheHashCalculator.php:109 Unresolved

    This docblock is redundant and contains no additional information, lets remove it
  12. Benni Mack commented on patch set 19 09/24/19, 14:35

    Published edit on patch set 18.
  13. TYPO3com voted on patch set 19 V -1 09/24/19, 14:55 Completed build in 17m 28s on Tue, 24 Sep, 02:55 PM Test Summary: 1 of 48107 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36768

  14. TYPO3com voted on patch set 19 V +1 09/25/19, 04:15 Completed build in 13h 54m 59s on Wed, 25 Sep, 04:15 AM Test Summary: 47748 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36768

  15. Alexander Opitz commented on patch set 19 V +1 CR +1 09/25/19, 07:04

    Ok, yes, better solution. Tested with 10 and tried as backport on a running 9.5.8 system.
  16. Markus Klein voted on patch set 19 CR +1 09/25/19, 11:34

  17. Susi Moog voted on patch set 19 CR +1 10/26/19, 08:29

  18. Markus Klösges voted on patch set 19 V +1 CR +1 10/31/19, 09:53

  19. Susi Moog uploaded patch set 20 11/09/19, 07:48

  20. TYPO3com voted on patch set 20 V -1 11/09/19, 07:48 Completed build in 15s on Sat, 9 Nov, 07:48 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38140

  21. Benni Mack uploaded patch set 21 11/09/19, 08:25

  22. TYPO3com voted on patch set 21 V +1 11/09/19, 08:35 Completed build in 09m 30s on Sat, 9 Nov, 08:35 AM Test Summary: 48175 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38141

  23. Susi Moog voted on patch set 21 V +1 CR +1 11/09/19, 08:39

  24. Benni Mack voted on patch set 21 V +2 CR +2 11/09/19, 08:41

  25. Benni Mack merged patch set 22 11/09/19, 08:41