Review main Merged

64123[TASK] Reduce directly invoked inline JavaScript

Oliver Hader CR +2 V +2 Hard +574 −105 updated 11/10/21, 08:49

Commit message

To decrease the amount of inline JavaScript that has been
generated by some PHP process assignments and invocations
are declared in a more strict way.

This would allow to make use of strict content security policy
denying invocation of unsafe-inline scripts.

Review

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

Issues 1

Files 21

Show 1 more file

Review log 3862

Show 2137 earlier messages
  1. Oliver Hader uploaded patch set 1 04/12/20, 13:48

  2. TYPO3com voted on patch set 1 V -1 04/12/20, 13:48 Completed build in 23s on Sun, 12 Apr, 01:48 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2397

  3. Oliver Hader uploaded patch set 2 04/12/20, 13:52

  4. TYPO3com voted on patch set 2 V -1 04/12/20, 14:03 Completed build in 11m 00s on Sun, 12 Apr, 02:03 PM Test Summary: 3 of 73881 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2398

  5. Oliver Hader uploaded patch set 3 04/13/20, 07:29

  6. TYPO3com voted on patch set 3 V -1 04/13/20, 07:40 Completed build in 10m 57s on Mon, 13 Apr, 07:40 AM Test Summary: 3 of 73893 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2420

  7. Oliver Hader wrote 04/19/20, 21:36

    Topic set to inline-javascript
  8. Oliver Hader updated the commit message in patch set 4 04/25/20, 08:49

  9. TYPO3com voted on patch set 4 V -1 04/25/20, 08:50 Completed build in 52s on Sat, 25 Apr, 08:50 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3026

  10. Oliver Hader uploaded patch set 5 08/25/21, 07:57

  11. core-ci voted on patch set 5 V -1 08/25/21, 08:16 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15562

  12. Oliver Hader uploaded patch set 6 10/21/21, 21:10

  13. core-ci voted on patch set 6 V -1 10/21/21, 21:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18412

  14. Oliver Hader uploaded patch set 7 10/22/21, 08:58

  15. core-ci voted on patch set 7 V -1 10/22/21, 09:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18420

  16. Oliver Hader uploaded patch set 8 10/22/21, 21:26

  17. core-ci voted on patch set 8 V -1 10/22/21, 21:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18431

  18. Oliver Hader uploaded patch set 9 11/02/21, 12:04

  19. core-ci voted on patch set 9 V -1 11/02/21, 12:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18747

  20. Oliver Hader uploaded patch set 10 11/03/21, 17:11

  21. core-ci voted on patch set 10 V -1 11/03/21, 17:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18804

  22. core-ci commented on patch set 10 11/03/21, 17:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18804

  23. Oliver Hader uploaded patch set 11 11/03/21, 20:28

  24. core-ci voted on patch set 11 V -1 11/03/21, 20:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18828

  25. Oliver Hader uploaded patch set 12 11/03/21, 21:02

  26. Oliver Hader uploaded patch set 13 11/03/21, 21:19

  27. core-ci voted on patch set 12 V -1 11/03/21, 21:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18834

  28. core-ci voted on patch set 13 V -1 11/03/21, 21:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18840

  29. Oliver Hader uploaded patch set 14 11/04/21, 15:59

  30. core-ci voted on patch set 14 V +1 11/04/21, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18906

  31. Oliver Hader commented on patch set 14 11/04/21, 16:28

    This change is ready for review.
  32. Oliver Hader commented on patch set 15 11/04/21, 16:31

    Published edit on patch set 14.
  33. Oliver Klee commented on patch set 15 11/04/21, 16:49

    DefaultConfiguration.php:1392

    Is the commented-out code intentional, or is this changeset still WIP?
  34. core-ci voted on patch set 15 V +1 11/04/21, 16:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18913

  35. Oliver Hader commented on patch set 15 11/04/21, 16:57

    DefaultConfiguration.php:1392 Reply

    That's still there to be enabled in later patches - and to tests CSP-behavior with change easily. I don't care whether it stays or is removed in this change-set...
  36. Oliver Klee commented on patch set 15 11/04/21, 16:58

    DefaultConfiguration.php:1392 Reply

    Thanks for the explanation! I'm fine either way.
  37. Andreas Kienast commented on patch set 15 V +1 11/05/21, 10:37

    JavaScriptRenderer.php:43

    Is there any specific reason for not using static::class or __CLASS__?

    JavaScriptRenderer.php:51

    We may use `: void` since we require at least PHP 7.4
  1. Oliver Hader commented on patch set 15 11/05/21, 11:15

    PageRenderer.php:2048

    Filter potential prototype pollution
  2. Oliver Klee wrote 11/05/21, 11:36

    Removed cc Oliver Klee.
  3. Oliver Hader uploaded patch set 16 11/05/21, 11:36

  4. Oliver Hader commented on patch set 16 11/05/21, 11:46

    PageRenderer.php:2048 Reply

    Done
  5. core-ci voted on patch set 16 V -1 11/05/21, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18945

  6. Oliver Hader uploaded patch set 17 11/05/21, 18:32

  7. core-ci voted on patch set 17 V +1 11/05/21, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18967

  8. Torben Hansen commented on patch set 17 V -1 11/06/21, 13:28

    Great work and huge improvement. I found a bug which occurs in frontend context and must be fixed. Therefore -1 for now.

    JavaScriptRenderer.php:40

    Can be shortened to $uri ??=

    PageRenderer.php:2049

    This is rendered as is in the frontend without any surrounded script tags. It results in the content being shown directly in page output. Also the JavaScript code should only be added, when page.inlineSettings is actually defined in TypoScript and not an empty string (see previous code).
  9. Oliver Hader commented on patch set 17 11/08/21, 17:29

    JavaScriptRenderer.php:40 Reply

    Done

    PageRenderer.php:2049 Reply

    Done
  10. Oliver Hader uploaded patch set 18 11/08/21, 17:35

  11. core-ci voted on patch set 18 V -1 11/08/21, 17:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19034

  12. core-ci voted on patch set 18 V +1 11/08/21, 18:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19034

  13. Oliver Hader uploaded patch set 19 11/08/21, 18:58

  14. Oliver Hader commented on patch set 19 11/08/21, 19:02

    JavaScriptRenderer.php:43 Reply

    Done

    JavaScriptRenderer.php:51 Reply

    Done
  15. Oliver Hader uploaded patch set 20 11/08/21, 19:02

  16. core-ci voted on patch set 19 V -1 11/08/21, 19:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19041

  17. core-ci voted on patch set 20 V -1 11/08/21, 19:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19042

  18. Oliver Hader uploaded patch set 21 11/08/21, 19:34

  19. core-ci voted on patch set 21 V -1 11/08/21, 19:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19045

  20. Oliver Hader uploaded patch set 22 11/08/21, 19:55

  21. core-ci voted on patch set 22 V +1 11/08/21, 20:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19047

  22. Torben Hansen voted on patch set 22 V +1 CR +1 11/10/21, 07:19

  23. Benni Mack voted on patch set 22 V +1 CR +1 11/10/21, 08:08

  24. Oliver Hader voted on patch set 22 V +2 CR +2 11/10/21, 08:49

  25. Oliver Hader merged patch set 23 11/10/21, 08:49