Review main Merged

71968[BUGFIX] Avoid deprecated FILTER_SANITIZE_STRING in TextValidator

Christian Kuhn CR +2 V +2 Normal +57 −28 updated 10/25/21, 18:12

Commit message

The filter_var() filter FILTER_SANITIZE_STRING is
deprecated as of PHP 8.1.

Extbase TextValidator uses it. Goal of the text
validator is to allow most 'casual' characters
and strings as long as they don't contain HTML.

The path switches to strip_tags() to validate.
Tests are refactored and extended to show more cases.

https://wiki.php.net/rfc/deprecations_php_8_1

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Jochen Roth +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Jochen Roth +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1115

  1. Christian Kuhn uploaded patch set 1 10/25/21, 13:14

  2. Christian Kuhn updated the commit message in patch set 2 10/25/21, 13:15

  3. core-ci voted on patch set 1 V +1 10/25/21, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18532

  4. core-ci voted on patch set 2 V +1 10/25/21, 13:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18533

  5. Chris Müller commented on patch set 2 10/25/21, 15:03

    TextValidator.php:32

    The reference can be removed.
  6. Chris Müller commented on patch set 2 10/25/21, 15:06

    TextValidator.php:34

    The value has to be a string, as strip_tags allows only a string as first argument.
  7. Christian Kuhn uploaded patch set 3 10/25/21, 15:27

  8. Christian Kuhn commented on patch set 2 10/25/21, 15:27

    TextValidator.php:32 Reply

    Done

    TextValidator.php:34 Reply

    Done
  9. Christian Kuhn uploaded patch set 4 10/25/21, 16:11

  10. Jochen Roth voted on patch set 4 V +1 CR +1 10/25/21, 16:15

  11. core-ci voted on patch set 4 V +1 10/25/21, 16:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18544

  12. core-ci voted on patch set 3 V +1 10/25/21, 16:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18542

  13. Anja Leichsenring voted on patch set 4 V +1 CR +1 10/25/21, 18:12

  14. Anja Leichsenring voted on patch set 4 V +2 CR +2 10/25/21, 18:12

  15. Anja Leichsenring merged patch set 5 10/25/21, 18:12