Review main Merged

96295[BUGFIX] Handle null bytes in Extbase DateTimeConverter

Georg Ringer CR +2 V +2 Normal +55 −10 updated 10/22/26, 15:52

Commit message

Since PHP 8.0, DateTime::createFromFormat() and the DateTimeZone
constructor throw a ValueError if the given string contains a null
byte. As request arguments may contain such bytes (e.g. "%00"), a
manipulated form submission led to an uncaught error.

The DateTimeConverter now returns the regular validation error for
date strings containing null bytes and throws the existing
TypeConverterException for such timezones.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Markus Klein +1
    • Alexander Schnitzler +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Markus Klein +1
    • Alexander Schnitzler +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 78

  1. Georg Ringer uploaded patch set 1 10/02/26, 07:07

  2. Georg Ringer commented on patch set 1 10/02/26, 07:07

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 10/02/26, 07:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109878

  4. Simon Schaufelberger voted on patch set 1 CR +1 V +1 10/09/26, 19:54

  5. Markus Klein voted on patch set 1 CR +1 V +1 10/12/26, 19:16

  6. Alexander Schnitzler commented on patch set 1 CR +1 V +1 10/13/26, 18:13

    DateTimeConverter.php:131

    You could keep the existing, less complex nesting and catch \ValueError here as well and be done with your null byte. It's less explicit but also easier to understand.
  7. Benni Mack commented on patch set 1 CR +2 V +2 10/22/26, 15:51

    DateTimeConverter.php:131 Reply

    I'll keep it as is.
  8. Benni Mack merged patch set 2 10/22/26, 15:52