Bug #95419
closedFileadmin upload larger than php memory limit results in excaused memory limit fatal error (e.g. a 2 GB Video File Upload)
0%
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
Updated by Matthias Gläßner about 3 years ago
- Target version changed from 11 LTS to next-patchlevel
Updated by Georg Ringer 5 months ago
- Sprint Focus set to Needs Decision
patch would still apply, but do we really have this issue?
Updated by Georg Ringer 5 months ago
- Related to Bug #88235: Ext: form file upload Memory error when file size exceeds available memory added
Updated by Georg Ringer 5 months 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