Project

General

Profile

Actions

Bug #95419

closed

Fileadmin upload larger than php memory limit results in excaused memory limit fatal error (e.g. a 2 GB Video File Upload)

Added by Matthias Gläßner over 2 years ago. Updated 3 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2021-09-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:
Needs Decision

Description

Reproducing
1. Set PHP Memory Limit to e.g. 64 MB
2. Go to TYPO3 Backend -> Fileadmin
3. Upload a test file with a size of 2 GB (e.g. create it on MAC via `dd if=/dev/zero of=100m bs=1m count=2000` or use a video file) to a random existing fileadmin folder
4. The upload startet
5. After 100% upload status the upload throws an "internal server error" error (red loading bar with error text in it)
6. in PHP error log the resulting error is: `Allowed memory size of xyz bytes exhausted`

*Not yed tested in:
TYPO3 > v. 8.7 ELTS

Explanation
The reason for that is, that FilePersistenceSlot of sysext:form loads the whole content of the file via file_get_contents into a variable to create a checksum over the including content (getContentSignature() + searchAllowedInvocation()).

Suggested Patch (works in TPYO3 v8.7 ELTS, not tested yet in TYPO3 v10/11/12)
- See attached patch file
- The patch limits the content size for checksum creation, so that max 32 MB of file content is used for checksum creation.


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #88235: Ext: form file upload Memory error when file size exceeds available memoryClosedSusanne Moog2019-04-27

Actions
Actions #1

Updated by Matthias Gläßner over 2 years ago

  • Category set to Backend API
Actions #2

Updated by Matthias Gläßner over 2 years ago

  • Target version changed from 11 LTS to next-patchlevel
Actions #3

Updated by Georg Ringer 7 days ago

  • Sprint Focus set to Needs Decision

patch would still apply, but do we really have this issue?

Actions #4

Updated by Georg Ringer 3 days ago

  • Related to Bug #88235: Ext: form file upload Memory error when file size exceeds available memory added
Actions #5

Updated by Georg Ringer 3 days ago

  • Status changed from New to Closed

I am closing this issue as this has been solved with #88235 which means that it would only occur if a .form.yaml file got a larger size than the memory which should really never be the case

Actions

Also available in: Atom PDF