Review main Merged

71639[BUGFIX] Avoid undefined array access in PageRenderer

Oli Bartsch CR +2 V +2 Normal +27 −33 updated 10/14/21, 20:14

Commit message

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Chris Müller +1
    • Stefan Bürk +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1214

  1. Oli Bartsch uploaded patch set 1 10/13/21, 21:30

  2. core-ci voted on patch set 1 V +1 10/13/21, 21:45 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18078

  3. Nikita Hovratov commented on patch set 1 CR -1 10/14/21, 07:27

    I think it's not necessary to add fallbacks for every property. Have a look at PageRenderer->addJsLibrary(). The default values are all initialized there. One exception: ResourceCompressor->concatenateJsFiles(). There are some properties missing: defer, nomodule, integrity and crossorigin. So imo we add these missing properties there already. I bet they were just forgotten, when these new features were introduced.
  4. Oli Bartsch commented on patch set 1 10/14/21, 07:36

    Reply

    Are you aware of the hooks, allowing thrid-party code to manipulate the array?
  5. Nikita Hovratov commented on patch set 1 CR 0 10/14/21, 07:49

    Reply

    No, tbh didn't thought of it. As long as users are calling the API methods everything is fine. But sure, they can add or remove stuff directly from the jsLibs array. If we go this route, I have a few more for you then.

    PageRenderer.php:2219

    splitChar

    PageRenderer.php:2263

    splitChar

    PageRenderer.php:2268

    section
  6. Oli Bartsch uploaded patch set 2 10/14/21, 08:13

  7. Oli Bartsch commented on patch set 2 10/14/21, 08:14

    PageRenderer.php:2219 Reply

    Done

    PageRenderer.php:2263 Reply

    Done

    PageRenderer.php:2268 Reply

    Done
  8. Nikita Hovratov voted on patch set 2 V +1 CR +1 10/14/21, 08:24

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

  10. Chris Müller voted on patch set 2 CR +1 10/14/21, 10:47

  11. Christian Kuhn voted on patch set 2 V +1 CR +1 10/14/21, 20:13

  12. Stefan Bürk voted on patch set 2 V +1 CR +1 10/14/21, 20:13

  13. Christian Kuhn voted on patch set 2 V +2 CR +2 10/14/21, 20:14

  14. Christian Kuhn merged patch set 3 10/14/21, 20:14