Review main Merged

52363[BUGFIX] Prevent uncaught exception in Import/Export controller

Nicole Hummel CR +2 V +2 Easy +22 −0 updated 06/20/17, 12:40

Commit message

Currently an error is thrown if no post data was sent to the
ImportExportController. This can easily happen if a t3d file should
be uploaded but is larger than the configured post_max_size of the
server. This patch checks the incoming information, sets the import
action as default and displays an information to the user that he/she
may have tried to upload a file that was too large.

Review

  • Code review CR +2
    • Susi Moog +2
    • Markus Klein +1
  • Verified V +2
    • Susi Moog +2
    • Markus Klein +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1418

  1. Nicole Hummel uploaded patch set 1 04/04/17, 13:26

  2. Markus Klein updated the commit message in patch set 2 04/04/17, 13:29

  3. Markus Klein commented on patch set 2 04/04/17, 13:30

    ImportExportController.php:200

    a user information
  4. Markus Klein commented on patch set 3 04/04/17, 13:31

    Published edit on patch set 2.
  5. Markus Klein commented on patch set 3 04/04/17, 13:31

    max upload size can play a role too here, not only the max_post
  6. TYPO3com voted on patch set 1 V +1 04/04/17, 13:35 Completed build in 08m 04s on Tue, 4 Apr, 03:35 PM Test Summary: 56582 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10298

  7. Nicole Hummel commented on patch set 3 04/04/17, 13:38

    @Markus: But max_upload_filesize doesn't result in empty POST information. This should add an error to _FILES array, shouldn't it?
  8. TYPO3com voted on patch set 2 V +1 04/04/17, 13:38 Completed build in 08m 58s on Tue, 4 Apr, 03:38 PM Test Summary: 56582 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10299

  9. TYPO3com voted on patch set 3 V +1 04/04/17, 13:45 Completed build in 14m 05s on Tue, 4 Apr, 03:45 PM Test Summary: 56582 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10300

  10. Markus Klein commented on patch set 3 06/20/17, 06:09

    locallang.xlf:316

    and max_upload_size
  11. Markus Klein commented on patch set 4 06/20/17, 06:10

    Published edit on patch set 3.
  12. Markus Klein voted on patch set 4 CR +1 V +1 06/20/17, 06:10

  13. TYPO3com voted on patch set 4 V +1 06/20/17, 06:19 Completed build in 09m 33s on Tue, 20 Jun, 08:19 AM Test Summary: 56498 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12697

  14. Susi Moog voted on patch set 4 CR +2 V +2 06/20/17, 11:09

  15. Gerrit merged patch set 4 06/20/17, 11:10

  16. Susi Moog commented on patch set 5 06/20/17, 11:11

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit 1ffbb223f6dd14d5062d0fa474b5d964dbfd9bbd
  17. Alexander Opitz commented on patch set 5 06/20/17, 12:16

    I only read the source yet, didn't test. But like to give a post -1 The issue with empty post only exists if: * post_max_size is equally or lower then upload_max_filesize * File is bigger then post_max_size And we do not break out of the import process, $this->importData is called independently if _GP returns data or not, but that's the part that should be prevented IMHO.
  18. Alexander Opitz commented on patch set 5 06/20/17, 12:40

    ImportExportController.php:203

    This results in running importData on the broken POST request. Instead of setting the action to import we should call $this->standaloneView->setTemplate('Import.html'); Or add a new action or whatever do not call the import process.