Review main Merged

58280[BUGFIX] Prevent TypoScript condition expressions breaking TYPO3

Frank Nägler CR +2 V +2 Easy +24 −1 updated 09/15/18, 12:23

Commit message

This patch introduces error handling to mitigate a missing type check
in the Symfony Expression Language handler. In case a condition
uses the "in" or "not in" check in combination with a non-array a PHP
warning is thrown.

Example: [1 in "foo"] or ["bar" in "foo,baz"]
These conditions are broken, but they will break the complete installation
including the backend. To mitigate the problem we do the following:

1) In FE an InvalidTypoScriptConditionException is thrown (if strictSyntax is enabled)
2) In FE catch this error silently and log it (if strictSyntax is disabled)
3) In BE catch this error silently and log it, but never break the backend.

Review

  • Code review CR +2
    • Markus Klein +2
    • Christian Kuhn +1
  • Verified V +2
    • Markus Klein +2
    • Christian Kuhn +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1216

  1. Frank Nägler uploaded patch set 1 09/14/18, 19:24

  2. TYPO3com voted on patch set 1 V +1 09/14/18, 19:36 Completed build in 11m 32s on Fri, 14 Sep, 09:36 PM Test Summary: 35905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28103

  3. Christian Kuhn updated the commit message in patch set 2 09/14/18, 21:31

  4. Christian Kuhn voted on patch set 2 V +1 CR +1 09/14/18, 21:32

  5. TYPO3com voted on patch set 2 V +1 09/14/18, 21:40 Completed build in 08m 55s on Fri, 14 Sep, 11:40 PM Test Summary: 35905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28107

  6. Georg Ringer commented on patch set 2 09/15/18, 08:23

    AbstractConditionMatcher.php:269

    we don't use the global namespace currently. instead of checking the message, can't we use the error code (if it is unique in symfony?

    AbstractConditionMatcher.php:271

    can we add the original exception message as well?
  7. Mathias Schreiber updated the commit message in patch set 3 09/15/18, 09:03

  8. Christian Kuhn voted on patch set 3 V +1 CR +1 09/15/18, 09:04

  9. TYPO3com voted on patch set 3 V +1 09/15/18, 09:13 Completed build in 10m 10s on Sat, 15 Sep, 11:13 AM Test Summary: 35905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28110

  10. Mathias Schreiber voted on patch set 3 V +1 CR +1 09/15/18, 09:39

  11. Markus Klein commented on patch set 3 09/15/18, 09:56

    AbstractConditionMatcher.php:269

    we don't do that!
  12. Markus Klein commented on patch set 4 09/15/18, 09:56

    Published edit on patch set 3.
  13. TYPO3com voted on patch set 4 V +1 09/15/18, 10:06 Completed build in 09m 07s on Sat, 15 Sep, 12:06 PM Test Summary: 35905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28112

  14. Christian Kuhn voted on patch set 4 V +1 CR +1 09/15/18, 11:57

  15. Markus Klein voted on patch set 4 V +2 CR +2 09/15/18, 12:23

  16. Markus Klein merged patch set 5 09/15/18, 12:23