Review main Merged

36697[TASK] Apply quoteJSvalue or htmlspecialchars to getModuleUrl

Wouter Wolters CR +2 V +2 Normal +61 −34 updated 02/10/15, 08:35

Commit message

Furthermore add BACK_PATH as 3rd argument where appropriate.

Review

  • Code review CR +2
    • Alexander Opitz +2
    • Jigal van Hemert +1
  • Verified V +2
    • Alexander Opitz +2
    • Jigal van Hemert +1

Issues 1

Files 20

Review log 24

  1. Wouter Wolters uploaded patch set 1 02/05/15, 22:36

  2. Michael Oehlhof voted on patch set 1 CR +1 02/05/15, 22:59

  3. Helmut Hummel commented on patch set 1 V -1 02/06/15, 08:15

    Tests fail: https://travis-ci.org/typo3-ci/TYPO3.CMS-pre-merge-tests/builds/49670614 There seems to be a PHP syntax error in typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php on line 1021
  4. Wouter Wolters commented on patch set 1 02/06/15, 08:16

    ClickMenu.php:1021

    here

    ClickMenu.php:1135

    space missing
  5. Wouter Wolters uploaded patch set 2 02/06/15, 08:22

  6. Michael Oehlhof commented on patch set 2 CR +1 02/06/15, 09:09

    I've overlook these mistakes while doing code review in gerrit. I'll better do it in PHPStorm next time.
  7. Alexander Opitz commented on patch set 2 CR -1 02/06/15, 12:51

    Only checked first file, maybe I do not understand it correctly, but it looks wrong.

    ClickMenu.php:730

    Beside that the code is hard to understand, we have 3 different forms to build $editOnClick at $this->frameLocation (beside the fact I don't understand the double braces): (($loc . '.document')) . '.search)+' . GeneralUtility::quoteJSvalue('& No escaped ' concatenated with quoteJSvalue

    ClickMenu.php:801

    (($loc . '.document')) . '.search)+\'' . '& With an escaped ' Concatenated without quote

    ClickMenu.php:1021

    (($loc . '.document')) . '.search)+\'' . '& With an escaped ' Concatenated without quote

    ClickMenu.php:1120

    (($loc . '.document')) . '.search)+"' . '& With " Concatenated without quote

    ClickMenu.php:1135

    (($loc . '.document')) . '.search)+"' . '& With " Concatenated without quote
  8. Wouter Wolters commented on patch set 2 02/06/15, 17:24

    Sorry Alexander I don't get your remarks...
  9. Jigal van Hemert commented on patch set 2 CR -1 V -1 02/07/15, 16:52

    Found a number of problems (missing quoteJSvalue() calls, wrong strings passed to quoteJSvalue()) and the lines are way too long in a number of places. Only commented a few, will change the rest directly. Will push a new set after going through all the changes in this patch.

    ClickMenu.php:730 Reply

    Partly correct. Hard to read, quoteJSvalue() does add quotes and the double braces are unnecessary.

    ClickMenu.php:801 Reply

    Plus a missing quoteJSvalue()
  10. Jigal van Hemert uploaded patch set 3 02/07/15, 19:00

  11. Jigal van Hemert voted on patch set 3 CR +1 V +1 02/07/15, 19:05

  12. Andreas Kienast uploaded patch set 4 02/08/15, 09:53

  13. Andreas Kienast voted on patch set 4 CR +1 V +1 02/08/15, 09:55

  14. Michael Oehlhof commented on patch set 4 02/08/15, 14:17

    PageLayoutController.php:481

    Is cmdd correct or a typo?
  15. Andreas Kienast commented on patch set 4 CR -1 02/08/15, 14:23

    PageLayoutController.php:481 Reply

    Good catch, I'm on it
  16. Andreas Kienast uploaded patch set 5 02/08/15, 14:27

  17. Jigal van Hemert commented on patch set 5 CR -1 02/08/15, 16:47

    Please don't include styling changes here. This patch only corrects the encoding of the new links and URLs.

    Clipboard.php:373

    This not related to the issue of this patch. Please move styling changes to a separate patch.
  18. Andreas Kienast commented on patch set 5 02/08/15, 17:12

    Clipboard.php:373 Reply

    This change is in master and was actually causing the conflict.
  19. Jigal van Hemert commented on patch set 5 CR +1 V +1 02/08/15, 17:31

    > (1 comment) Oops! Sorry! That happens if I review without syncing first <facepalm>
  20. Alexander Opitz commented on patch set 5 CR -1 02/09/15, 10:34

    I'm on review atm ... will take a while.

    ClickMenu.php:808

    Double open/close brackets? 18 times in the source.
  21. Wouter Wolters commented on patch set 5 02/09/15, 10:44

    Guys this is not about resolving all places where single quotes are used with a backslash!!!! Please only review the needed changes for getModuleUrl. THANKS!
  22. Alexander Opitz commented on patch set 5 CR +1 02/09/15, 11:46

    All in all it doesn't look nice but sufficient for this issue.
  23. Alexander Opitz voted on patch set 5 V +2 CR +2 02/10/15, 08:35

  24. Alexander Opitz merged patch set 5 02/10/15, 08:35