Issue Bug Closed

#108912Corrupt request data due to extbase property mapping in v13

Aimeos no-lastname-given 02/09/26, 10:49 updated 03/31/26, 08:10

Description

This commit merges uploads into the GET/POST request data, leading to corrupt request data and non-standard behavior:
https://github.com/TYPO3/typo3/commit/e3ad96ad98c3d04b3b8c21b22869ec139392fc38

The intended property mapping must be done elsewhere but not by merging into the request parameters.

Original bug report:
https://github.com/aimeos/ai-admin-jqadm/issues/309

Reviews 3

History 810

  1. Torben Hansen commented and changed status New Needs Feedback Is Regression 1 0 <span data-processor="relativetime" data-value="2026-02-09T19:07:07+00:00" > 02/09/26, 19:07 </span>

    Please describe:

    • corrupt request data
    • non-standard behavior

    The affected patch fixes a bug with uploaded files not being mapped into extbase argument. Extbase did always map uploaded files (until v12 as array, since v13 as UploadedFile object) to request arguments. This has been changed in v12 as breaking change with a backward compatibility layer, which has been removed in v13 (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/73868)

    Removing the array_merge like re-added in #102283 is no option, since this will break file upload in ext:form and ext:extbase.

  2. Aimeos no-lastname-given commented <span data-processor="relativetime" data-value="2026-02-10T10:09:42+00:00" > 02/10/26, 10:09 </span>

    For numerically indexed arrays (where the problem surfaces), array_merge_recursive() creates a another entry for each upload, e.g.:

    media[0][name]=myimage
    // leads to
    media[0][name]=myimage
    media[1][file]=UploadedFile object

    But the correct result is:

    media[0][name]=myimage
    media[0][file]=UploadedFile object

    array_merge_recursive() is wrong and must be changed to array_replace_recursive()

  3. Torben Hansen commented and changed status Needs Feedback Accepted <span data-processor="relativetime" data-value="2026-02-10T11:03:15+00:00" > 02/10/26, 11:03 </span>

    Thanks for your feedback. Can you confirm you use something like the following snippet?

        <f:form.textfield property="files.0.name" />
        <f:form.upload property="files.0.file" />
        <f:form.textfield property="files.1.name" />
        <f:form.upload property="files.1.file" />

    This will not work with the new extbase fileupload in v13, since it does not support nested models.

    The array_replace_recursive() looks good as a fix from a first look/test, but needs additional testing and test coverage incode.

  4. Aimeos no-lastname-given commented <span data-processor="relativetime" data-value="2026-02-10T11:14:25+00:00" > 02/10/26, 11:14 </span>

    No, we don’t use Fluid. The problem surfaces in the Aimeos admin backend, which isn’t Fluid based.

  5. Gerrit Code Review pushed patch set 1 for main to change 92853 status Accepted Under Review <span data-processor="relativetime" data-value="2026-02-15T18:10:58+00:00" > 02/15/26, 18:10 </span>

  6. Torben Hansen commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-02-20T16:35:08+00:00" > 02/20/26, 16:35 </span>

    Applied in changeset commit:81f1e4a97a9cd858053f7e2765e1018cc13c24dd.