Review main Merged

64259[BUGFIX] Prevent creation of PageLayoutContext without access

Claus Due CR +2 V +2 Normal +81 −68 updated 04/21/20, 07:37

Commit message

Skip creation of the PageLayoutContext in PageLayoutController
if the user has no access to the page, or if the ID parameter
was malformed.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Andreas Kienast +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2129

Show 4 earlier messages
  1. Claus Due uploaded patch set 1 04/20/20, 14:41

  2. Andreas Kienast updated the commit message in patch set 2 04/20/20, 14:50

  3. Andreas Kienast voted on patch set 2 V +1 CR +1 04/20/20, 14:50

  4. Oli Bartsch voted on patch set 2 V +1 CR +1 04/20/20, 14:52

  1. TYPO3com voted on patch set 1 V -1 04/20/20, 14:55 Completed build in 13m 55s on Mon, 20 Apr, 02:55 PM Test Summary: 73677 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2903

  2. TYPO3com voted on patch set 2 V -1 04/20/20, 15:05 Completed build in 14m 41s on Mon, 20 Apr, 03:05 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2905

  3. Claus Due uploaded patch set 3 04/20/20, 15:22

  4. TYPO3com voted on patch set 3 V +1 04/20/20, 15:36 Completed build in 13m 44s on Mon, 20 Apr, 03:36 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2909

  5. Oliver Hader voted on patch set 3 V +1 04/20/20, 15:40

  6. Oliver Klee commented on patch set 3 04/20/20, 15:40

    PageLayoutController.php:189

    This can either be an array or false. Please let's make this check more explicit: if ($this->pageinfo !== false) (And also please let's change the PHPDoc type annotation of $this->pageinfo from array to array|bool.)

    PageLayoutController.php:559

    I recommend to change this to "if ($this->context instanceof …)". This will make it more explicit what is checked, and it also helps static code analysis. (Ditto for the other similar place.)
  7. Oliver Hader commented on patch set 3 04/20/20, 20:02

    @Claus: Are you still working on this?
  8. Claus Due commented on patch set 3 04/20/20, 22:00

    > Patch Set 3: > > @Claus: Are you still working on this? No, I asked in the channel for someone to take over - I thought if it didn't get merged before 18:00 it would have to wait for the next release?
  9. Oli Bartsch uploaded patch set 4 04/20/20, 22:45

  10. Oli Bartsch uploaded patch set 5 04/20/20, 22:47

  11. Oli Bartsch commented on patch set 5 V +1 CR +1 04/20/20, 22:48

    PageLayoutController.php:189 Reply

    Done

    PageLayoutController.php:559 Reply

    Done
  12. TYPO3com voted on patch set 4 V -1 04/20/20, 23:05 Completed build in 19m 51s on Mon, 20 Apr, 11:05 PM Test Summary: 1 of 74142 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2928

  13. TYPO3com voted on patch set 5 V +1 04/20/20, 23:09 Completed build in 20m 38s on Mon, 20 Apr, 11:09 PM Test Summary: 73655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2929

  14. Oliver Klee commented on patch set 6 04/20/20, 23:18

    Published edit on patch set 5.
  15. TYPO3com voted on patch set 6 V -1 04/20/20, 23:52 Completed build in 33m 28s on Mon, 20 Apr, 11:52 PM Test Summary: 5 of 74143 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2930

  16. Josef Glatz updated the commit message in patch set 7 04/21/20, 04:54

  17. TYPO3com voted on patch set 7 V -1 04/21/20, 05:08 Completed build in 13m 26s on Tue, 21 Apr, 05:08 AM Test Summary: 72550 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2932

  18. TYPO3com voted on patch set 7 V +1 04/21/20, 06:24 Completed build in 1h 42m 56s on Tue, 21 Apr, 06:24 AM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2932

  19. Andreas Kienast voted on patch set 7 V +1 CR +1 04/21/20, 06:33

  20. Georg Ringer commented on patch set 7 04/21/20, 06:41

    PageLayoutController.php:637

    I would switch that to a guard clause
  21. Oliver Hader voted on patch set 7 V +1 04/21/20, 06:49

  22. Andreas Kienast commented on patch set 7 04/21/20, 06:58

    PageLayoutController.php:637 Reply

    What would you guard here? We have additional code being executed after that (yes, rather huge) if clause.
  23. Oliver Hader voted on patch set 7 V +2 CR +2 04/21/20, 07:02

  24. Oliver Hader merged patch set 8 04/21/20, 07:04

  25. Oliver Hader commented on patch set 8 04/21/20, 07:37

    PageLayoutController.php:637 Reply Unresolved

    Keeping it for the time being... chances are good that this code gets more complicated after the refactoring