Review main Merged

72011[BUGFIX] Sanitize calling htmlspecialchars(...) in FormViewHelper

Stefan Bürk CR +2 V +2 Easy +3 −3 updated 11/03/21, 20:26

Commit message

htmlspecialchars(...) expects that first argument is a string,
otherwise triggering E_DEPRECATED.

This patch adds a string cast to ensure value is passed as string
to htmlspecialchars(...) in FormViewHelper.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Oliver Klee +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1518

  1. Stefan Bürk uploaded patch set 1 10/30/21, 18:26

  2. Oliver Klee voted on patch set 1 CR +1 10/30/21, 18:31

  3. core-ci voted on patch set 1 V +1 10/30/21, 18:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18683

  4. Georg Ringer voted on patch set 1 V +1 CR +1 11/01/21, 10:27

  5. Andreas Kienast updated the commit message in patch set 2 11/01/21, 10:38

  6. Andreas Kienast voted on patch set 2 V +1 CR +1 11/01/21, 10:40

  7. Oliver Klee voted on patch set 2 CR +1 11/01/21, 10:52

  8. core-ci voted on patch set 2 V +1 11/01/21, 11:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18714

  9. Nikita Hovratov commented on patch set 2 V +1 CR -1 11/01/21, 14:08

    Works, but want to know, if we can fix it at another point.

    FormViewHelper.php:174

    $this->arguments['hiddenFieldClassName'] can't be null here.

    FormViewHelper.php:279

  10. Stefan Bürk commented on patch set 2 11/03/21, 15:23

    Thx Nikita for the review and the inputs. Will recheck this later after work, last day's were busy with work.
  11. Stefan Bürk commented on patch set 2 11/03/21, 19:32

    FormViewHelper.php:174 Reply

    Ack. Will revert this then.

    FormViewHelper.php:279 Reply

    Have checked, initialzing that property as string would fix it also, so the changes here are unneed. Will try to ping @lolli why he added only a @todo, if he has seen any sideeffect which I/we could no see - or it is safe to change it there.
  12. Stefan Bürk uploaded patch set 3 11/03/21, 20:10

  13. Stefan Bürk commented on patch set 3 11/03/21, 20:11

    FormViewHelper.php:174 Reply

    Done
  14. Oliver Klee voted on patch set 3 CR +1 11/03/21, 20:19

  15. core-ci voted on patch set 3 V +1 11/03/21, 20:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18825

  16. Christian Kuhn commented on patch set 3 V +1 CR +1 11/03/21, 20:25

    FormViewHelper.php:279 Reply Unresolved

    Changing this in ExtbaseRequestParameters by solving the @todo is imho a bit too risky in v11 - I'm simply not 100% sure we don't raise side effects doing this. I'd thus go with the change as proposed in v11. v12 will see breaking changes in ExtbaseRequestParameters and extbase request classes - let's solve the todo at this point in time.
  17. Anja Leichsenring voted on patch set 3 V +2 CR +2 11/03/21, 20:26

  18. Anja Leichsenring merged patch set 4 11/03/21, 20:26