Review main Merged

48102[TASK] Deprecate RemoveXSS

Georg Ringer CR +2 V +2 Normal +68 −143 updated 05/26/16, 13:52

Commit message

Due to the wrong approach of RemoveXSS it is not 100%
safe and does not keep its promise.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Nicole Hummel +1
  • Verified V +2
    • Wouter Wolters +2
    • Nicole Hummel +1

Issues 1

Files 21

Show 1 more file

Review log 38

Show 13 earlier messages
  1. Georg Ringer uploaded patch set 1 05/12/16, 13:05

  2. Mathias Brodala updated the commit message in patch set 2 05/12/16, 13:16

  3. Mathias Brodala commented on patch set 2 05/12/16, 13:16

    FrontendLoginController.php:1011

    Can we drop this now unused translation, too?

    FrontendLoginController.php:1011

    Can we drop this now unused translation, too?
  4. Daniel Goerz uploaded patch set 3 05/12/16, 15:50

  5. Daniel Goerz voted on patch set 3 CR +1 05/12/16, 15:51

  6. Helmut Hummel uploaded patch set 4 05/18/16, 11:28

  7. Helmut Hummel commented on patch set 4 05/18/16, 11:28

    Removed the XSS Filter from ts configuration as well
  8. Markus Klein updated the commit message in patch set 5 05/18/16, 11:32

  9. Oliver Klee commented on patch set 4 05/18/16, 11:34

    RemoveXssFilter.php:38

    Should we have a deprecation log entry here?
  10. Markus Klein commented on patch set 6 05/18/16, 11:34

    Published edit on patch set 5.
  11. Helmut Hummel uploaded patch set 7 05/18/16, 11:35

  12. Markus Klein commented on patch set 8 05/18/16, 11:36

    Published edit on patch set 7.
  13. Helmut Hummel commented on patch set 6 05/18/16, 11:37

    GeneralUtility.php:256

    uhm, no. the deprecation is logged already in \RemoveXSS::process

    Deprecation-76164-DeprecateRemoveXSS.rst:10

    I'll fix this in a new patch set again
  1. Helmut Hummel uploaded patch set 9 05/18/16, 11:38

  2. Helmut Hummel commented on patch set 4 05/18/16, 11:39

    RemoveXssFilter.php:38 Reply

    deprecation will be logged in the final static method which is beeing called. adding a messgage here will result in duplicate messages for one usage
  3. Markus Klein commented on patch set 8 05/18/16, 11:40

    GeneralUtility.php:256

    missing deprecation log

    RemoveXssFilter.php:38

    deprecation log missing
  4. Markus Klein commented on patch set 8 05/18/16, 11:40

    RemoveXssFilter.php:38 Reply

    forget it, obsolete!
  5. Markus Klein commented on patch set 6 05/18/16, 11:42

    GeneralUtility.php:256 Reply

    Question is whether we still should log the usage of this function too?
  6. Helmut Hummel updated the commit message in patch set 10 05/18/16, 11:43

  7. Markus Klein voted on patch set 10 CR +1 05/18/16, 11:45

  8. Markus Klein voted on patch set 10 V +1 05/18/16, 11:51

  9. Nicole Hummel commented on patch set 10 05/18/16, 11:51

    Index.rst:369

    This has to be changed as well.
  10. Helmut Hummel uploaded patch set 11 05/18/16, 12:02

  11. Helmut Hummel commented on patch set 10 05/18/16, 12:02

    Index.rst:369 Reply

    good catch
  12. Nicole Hummel commented on patch set 11 V -1 05/18/16, 12:09

    There were 5 failures: 1) TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest::sanitizeLocalUrlDeniesPlainInvalidUrls with data set "relative path with XSS" ('../typo3/whatever.php?argumen...ert(0)') Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'' +'../typo3/whatever.php?argument=javascript:alert(0)' D:\Version Control\Git\TYPO3\TYPO3.CMS\master\typo3\sysext\core\Tests\Unit\Utility\GeneralUtilityTest.php:2202 D:\Version Control\Git\TYPO3\TYPO3.CMS\master\vendor\phpunit\phpunit\phpunit:47 2) TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest::sanitizeLocalUrlDeniesEncodedInvalidUrls with data set "relative path with XSS" ('../typo3/whatever.php?argumen...ert(0)') Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'' +'..%2Ftypo3%2Fwhatever.php%3Fargument%3Djavascript%3Aalert%280%29' D:\Version Control\Git\TYPO3\TYPO3.CMS\master\typo3\sysext\core\Tests\Unit\Utility\GeneralUtilityTest.php:2211 D:\Version Control\Git\TYPO3\TYPO3.CMS\master\vendor\phpunit\phpunit\phpunit:47 3) TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest::validateRedirectUrlClearsUrl with data set "XSS attempt 2" ('" onmouseover="alert(123)"') Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'' +'" onmouseover="alert(123)"' D:\Version Control\Git\TYPO3\TYPO3.CMS\master\typo3\sysext\felogin\tests\Unit\Controller\FrontendLoginControllerTest.php:182 D:\Version Control\Git\TYPO3\TYPO3.CMS\master\vendor\phpunit\phpunit\phpunit:47 4) TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest::validateRedirectUrlClearsUrl with data set "invalid URL, HTML break out attempt" ('" >blabuubb') Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'' +'" >blabuubb' D:\Version Control\Git\TYPO3\TYPO3.CMS\master\typo3\sysext\felogin\tests\Unit\Controller\FrontendLoginControllerTest.php:182 D:\Version Control\Git\TYPO3\TYPO3.CMS\master\vendor\phpunit\phpunit\phpunit:47 5) TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest::validateRedirectUrlClearsUrl with data set "invalid URL, UNC path" ('\\foo\bar\') Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'' +'\\foo\bar\' D:\Version Control\Git\TYPO3\TYPO3.CMS\master\typo3\sysext\felogin\tests\Unit\Controller\FrontendLoginControllerTest.php:182 D:\Version Control\Git\TYPO3\TYPO3.CMS\master\vendor\phpunit\phpunit\phpunit:47
  13. Nicole Hummel commented on patch set 11 05/18/16, 12:10

    Anyone working on the unit test issues? Otherwise I can try to push a new patch set this evening.
  14. Markus Klein commented on patch set 11 05/18/16, 12:31

    ? I ran the unittests on master and all were green
  15. Markus Klein commented on patch set 11 05/18/16, 12:32

    Whatever I did wrong, sorry for my v+1 before then.
  16. Helmut Hummel commented on patch set 11 V -1 05/18/16, 12:43

    I can confirm the test failures. thanks!
  17. Nicole Hummel uploaded patch set 12 05/20/16, 17:07

  18. Nicole Hummel uploaded patch set 13 05/20/16, 17:07

  19. Elmar Hinz uploaded patch set 14 05/22/16, 07:27

  20. Markus Klein voted on patch set 14 CR +1 05/22/16, 08:04

  21. Wouter Wolters commented on patch set 14 CR -1 05/26/16, 12:16

    2 failing test, on it

    Deprecation-76164-DeprecateRemoveXSS.rst:30

    space after chars``
  22. Wouter Wolters uploaded patch set 15 05/26/16, 12:17

  23. Nicole Hummel commented on patch set 15 CR +1 V +1 05/26/16, 13:06

    Verified by running unit and functional tests.
  24. Wouter Wolters voted on patch set 15 CR +2 V +2 05/26/16, 13:52

  25. Gerrit merged patch set 15 05/26/16, 13:52