Review main Merged

78473[BUGFIX] Add frontend preview URL to CSP frame-src directive

Oliver Hader CR +2 V +2 Normal +86 −3 updated 04/06/23, 07:51

Commit message

Add the URL of the page to be shown in web > view backend module to
the `frame-src` directive of the Content-Security-Policy. This is
required in case the backend URL is different to the frontend URL
that shall be used to preview that page.

The new registry service `PolicyRegistry` is introduced to collect
temporary adjustments to the Content-Security-Policy, which are
applied in the central `PolicyProvider`.

Review

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

Issues 1

Files 4

Review log 1318

  1. Oliver Hader uploaded patch set 1 04/05/23, 09:03

  2. core-ci voted on patch set 1 V +1 04/05/23, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40165

  3. Oliver Hader uploaded patch set 2 V +1 04/05/23, 09:33

  4. core-ci voted on patch set 2 V +1 04/05/23, 09:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40167

  5. Oliver Hader uploaded patch set 3 V +1 04/05/23, 09:47

  6. core-ci voted on patch set 3 V +1 04/05/23, 09:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40169

  7. Oliver Hader commented on patch set 3 04/05/23, 10:20

    ViewModuleController.php:128

    @todo Check whether URI has a domain part & only apply modification in that case...
  8. Tymoteusz Motylewski commented on patch set 3 04/05/23, 11:04

    this didn't solve the issue with acc tests in CI, as the directive is invalid (doesn't contain domain i think): 09:57:46.194 SEVERE - http://web:8000/typo3temp/var/tests/acceptance/typo3/module/web/viewpage?token=135b8b7bf26bb4ff90624d3b00c685c80c1c9e48&id=227&; - The source list for the Content Security Policy directive 'frame-src' contains an invalid source: '/typo3temp/var/tests/acceptance/styleguide-demo-227/'. It will be ignored.
  9. Oliver Hader uploaded patch set 4 V +1 04/05/23, 14:03

  10. Oliver Hader commented on patch set 4 04/05/23, 14:05

    The failure in other acc tests in still another topics, e.g. those tests are somehow using `http://localhost` as URI, even if the backend was accessed via `http://web:8000`...

    ViewModuleController.php:128 Reply

    Done
  11. core-ci voted on patch set 4 V +1 04/05/23, 14:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40188

  12. Andreas Kienast voted on patch set 4 V +1 CR +1 04/05/23, 14:38

  13. Andreas Kienast rebased onto patch set 5 CR +1 V +1 04/06/23, 07:22

  14. Andreas Kienast commented on patch set 5 V +1 CR +1 04/06/23, 07:26

    Dang, my checkout wasn't clean
  15. core-ci voted on patch set 5 V +1 04/06/23, 07:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40235

  16. Benni Mack voted on patch set 5 V +1 CR +1 04/06/23, 07:39

  17. Oliver Hader commented on patch set 5 V +2 CR +2 04/06/23, 07:51

    Thx folks!
  18. Oliver Hader merged patch set 6 04/06/23, 07:51