Review main Merged

93095[TASK] Ensure EmptyValidator always executes

Josua Vogel CR +2 V +2 Easy +26 −1 updated 09/28/26, 12:59

Commit message

The EmptyValidator used by the form framework's honeypot mechanism is
intended to be executed for every value. However, it inherited
$acceptsEmptyValues = true from AbstractValidator, causing
AbstractValidator::validate() to skip isValid() for empty values.

Set $acceptsEmptyValues to false so isValid() is always called. This does
not change the validation result for empty values, but aligns the
implementation with the intended validator semantics.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Torben Hansen +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Torben Hansen +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2027

Show 12 earlier messages
  1. Josua Vogel uploaded patch set 1 03/05/26, 21:34

  2. core-ci voted on patch set 1 V +1 03/05/26, 21:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97443

  1. Torben Hansen commented on patch set 1 03/09/26, 08:04

    I consider this change as breaking, because it changes the behavior of the ViewHelper. The ViewHelper might only be used for the honeypot validation (no spam protection these days any more), but other users may rely on the current behavior. I think, we could maybe change this in v14 only and add an important RST file. I therefore suggest to team this up with at leat 2 core mergers in this matter.
  2. Josua Vogel commented on patch set 1 03/09/26, 08:13

    Reply

    v14 and a important rst file would be fine with me. But first, let's wait for feedback from Core mergers.
  3. Georg Ringer commented on patch set 1 03/10/26, 04:05

    yes, please only v14 and rst would be fine for me
  4. Josua Vogel uploaded patch set 2 V +1 03/10/26, 19:06

  5. core-ci voted on patch set 2 V +1 03/10/26, 19:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97713

  6. Benni Mack updated the commit message in patch set 3 V +1 04/22/26, 07:14

  7. core-ci voted on patch set 3 V -1 04/22/26, 12:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100847

  8. Josua Vogel uploaded patch set 4 V -1 04/23/26, 10:17

  9. Josua Vogel updated the commit message in patch set 5 04/23/26, 10:18

  10. core-ci voted on patch set 5 V +1 04/23/26, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101024

  11. core-ci voted on patch set 4 V -1 04/23/26, 11:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101022

  12. Josua Vogel commented on patch set 5 05/07/26, 07:15

    Reply

    I took another look at the fix: Actually, this isn't a breaking change, and in my opinion, the `Important rst file` can be omitted as well. The Validator is final, meaning no one could inherit from it. Am I missing something?
  13. Simon Schaufelberger commented on patch set 5 09/22/26, 11:16

    There should be a test to cover the change
  14. Josua Vogel commented on patch set 5 09/24/26, 13:14

    Reply

    I checked the existing EmptyValidator tests. They verify the validation result, which is unchanged by this patch and passes with both values of $acceptsEmptyValues. Since isValid() has no observable side effect for empty values, an additional functional test cannot meaningfully prove that it was called. The Important changelog documents the intended execution semantics.
  15. Josua Vogel uploaded patch set 6 V +1 09/24/26, 13:15

  16. Josua Vogel commented on patch set 6 09/24/26, 13:16

    Reply

    Done
  17. Torben Hansen commented on patch set 5 09/24/26, 13:16

    EmptyValidator.php:30

    "needs to" must remain
  18. Josua Vogel commented on patch set 7 09/24/26, 13:17

    Published edit on patch set 6.
  19. Josua Vogel commented on patch set 7 09/24/26, 13:17

    EmptyValidator.php:30 Reply

    Done
  20. core-ci voted on patch set 6 V +1 09/24/26, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109159

  21. core-ci voted on patch set 7 V +1 09/24/26, 13:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109160

  22. Simon Schaufelberger voted on patch set 7 CR +1 V +1 09/24/26, 14:28

  23. Torben Hansen voted on patch set 7 CR +1 V +1 09/26/26, 09:31

  24. Benni Mack voted on patch set 7 CR +2 V +2 09/28/26, 12:59

  25. Benni Mack merged patch set 8 09/28/26, 12:59