Review 9.5 Merged

70588[BUGFIX] Adjust default behavior of HTML sanitization in parseFunc

Oliver Hader CR +2 V +2 Hard +427 −241 updated 08/16/21, 11:22

Commit message

As a result of TYPO3-CORE-SA-2021-013, new `htmlSanitize` behavior -
when invoking `ContentObjectRenderer::parseFunc` - is enabled per
default, in case it was not declared otherwise. That also happened
when no processing configuration was given (or could be resolved).
Without having any configuration, it was obviously not possible to
disable `htmlSanitize`.

Fluid's `HtmlViewHelper` can be used with an empty `parseFuncTSPath`
(e.g. `<f:format.html parseFuncTSPath="">`) - due to missing (empty)
configuration, sanitization was enabled per default in `parseFunc`.

With this change, property `htmlSanitize` either needs to be enabled
or disabled explicitly - otherwise deprecation logs will be generated,
if not given, the fall-back behavior is inferred from new feature flag
`security.frontend.htmlSanitizeParseFuncDefault`.

Invoking `ContentObjectRenderer::parseFunc` without any configuration
behaves like before TYPO3-CORE-SA-2021-013 was applied - it just does
not process anything.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 13

Review log 811

  1. Oliver Hader uploaded patch set 1 08/14/21, 06:45

  2. Oliver Hader marked it work in progress 08/14/21, 06:46

  3. core-ci voted on patch set 1 V +1 08/14/21, 06:56 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15038

  4. Oliver Hader uploaded patch set 2 08/16/21, 10:02

  5. core-ci voted on patch set 2 V +1 08/16/21, 10:16 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15153

  6. Oliver Hader uploaded patch set 3 08/16/21, 10:30

  7. Oliver Hader marked it ready for review 08/16/21, 10:34

  8. Benni Mack voted on patch set 3 V +1 CR +1 08/16/21, 10:34

  9. core-ci commented on patch set 3 08/16/21, 10:46 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15156

  10. Benni Mack voted on patch set 3 V +2 CR +2 08/16/21, 11:22

  11. Benni Mack merged patch set 4 08/16/21, 11:22