Review main Ready for review

97564[BUGFIX] Ignore plain string in file upload type converter

Georg Ringer CR +1 V +1 Easy +31 −4 updated 11/20/26, 09:26

Commit message

The type converter for file uploads treats a value that is not an
array as no uploaded file. Requests that submit a plain string for a
file upload field, as sent by spam bots, now re-render the form with
its validation errors instead of ending in a server error.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/64/97564/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/64/97564/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Josua Vogel +1
  • Verified V +1 Needs a vote
    • Josua Vogel +1
    • core-ci +1 CI

Merge conflicts 1

Issues 1

Files 2

Review log 69

  1. Georg Ringer uploaded patch set 1 11/11/26, 20:29

  2. Georg Ringer commented on patch set 1 11/11/26, 20:30

    This change is ready for review.
  3. core-ci voted on patch set 1 V -1 11/11/26, 20:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114143

  4. Oli Bartsch commented on patch set 1 11/14/26, 09:57

    UploadedFileReferenceConverter.php:172

    IMO this is currently not correct. We need to remove the early return above and properly check for array here. Additionally we might even change doc comment as string will always lead to null. ```suggestion if (!is_array($source) || $source === []) { ```
  5. core-ci voted on patch set 1 V +1 11/18/26, 10:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114143

  6. Georg Ringer uploaded patch set 2 V +1 11/19/26, 17:20

  7. Georg Ringer commented on patch set 2 11/19/26, 17:21

    UploadedFileReferenceConverter.php:172 Reply

    Done
  8. core-ci voted on patch set 2 V +1 11/19/26, 17:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115031

  9. Josua Vogel voted on patch set 2 CR +1 V +1 11/20/26, 09:26