Review main Merged

47193[BUGFIX] Prevent XSS in ViewHelpers

Nicole Hummel CR +2 V +2 Easy +29 −15 updated 03/13/16, 21:44

Commit message

This patch removes wrongly introduced missing escaping in ViewHelpers
and adds some documentation about escaping settings.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Daniel Goerz +1
    • Mathias Schreiber +1
    • Wouter Wolters +1
    • Michael Oehlhof +1
    • Jigal van Hemert +1
  • Verified V +2
    • Helmut Hummel +2
    • Mathias Schreiber +1
    • Jigal van Hemert +1

Issues 1

Files 8

Review log 17

  1. Nicole Hummel uploaded patch set 1 03/11/16, 10:17

  2. Frank Nägler wrote 03/11/16, 10:24

    Patch set 2: Published edit on patch set 1.
  3. Frank Nägler commented on patch set 2 CR +1 03/11/16, 10:25

    removed spaces at end if line
  4. Markus Klein commented on patch set 2 03/11/16, 10:26

    UrlencodeViewHelper.php:57

    not sure about that one. Why? <f:format.rawurlencode>{foo}</f:format.rawurlencode> IMO foo must be escaped here.
  5. Markus Klein commented on patch set 2 CR +1 03/11/16, 10:33

    UrlencodeViewHelper.php:57 Reply

    my fault. rawurlencode kills all possible special chars that would be covered by htmlspecialchars(), so this is OK.
  6. Nicole Hummel commented on patch set 2 03/11/16, 10:34

    UrlencodeViewHelper.php:57 Reply

    That would cause double encoding on foo what would be wrong and not expected by the user. that would mean rawurlencode(htmlspecialchars(<script>alert('xss')</script>)) already rawurlencode(<script>alert('xss')</script>) is enough escapting to prevent xss (%3Cscript%3Ealert%28%27xss%27%29%3C%2Fscript%3E)
  7. Helmut Hummel commented on patch set 2 CR -1 03/11/16, 15:24

    On glitch in DateViewHelper. Rest looks good, thanks!

    DebugViewHelper.php:43

    And especially the children can be of different type than string

    DebugViewHelper.php:50

    good catch!

    DateViewHelper.php:90

    This is good to be removed!

    DateViewHelper.php:95

    This must be kept. <f:format.date>{dateTimeObject}</f:format.date> The value of renderChildren can be a datetime object
  8. Nicole Hummel uploaded patch set 3 03/11/16, 15:34

  9. Markus Klein voted on patch set 3 CR +1 03/11/16, 16:21

  10. Andreas Kienast wrote 03/11/16, 16:27

    Patch set 4: Published edit on patch set 3.
  11. Wouter Wolters voted on patch set 4 CR +1 03/11/16, 19:45

  12. Mathias Schreiber commented on patch set 4 CR +1 V +1 03/12/16, 17:05

    Awesome idea btw. to document WHY escaping was disabled
  13. Jigal van Hemert voted on patch set 4 CR +1 V +1 03/12/16, 23:23

  14. Michael Oehlhof voted on patch set 4 CR +1 03/13/16, 13:04

  15. Daniel Goerz voted on patch set 4 CR +1 03/13/16, 21:35

  16. Helmut Hummel voted on patch set 4 CR +2 V +2 03/13/16, 21:44

  17. Gerrit merged patch set 4 03/13/16, 21:44