Skip to content
Snippets Groups Projects
Commit 46e32e0b authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Andreas Kienast
Browse files

[BUGFIX] Allow dumping files larger than allowed memory size

The `SelfEmittableLazyOpenStream` class used by FileDumpController
uses `readfile` which is meant to be a performant way to send
files to the webserver (implemented by PHP in C) and does not
count as runtime memory usage (memory_limit) if the output is
unbuffered.

Make sure to clear any output buffers before emitting self emittable
streams in order for PHP to be able to send the files without copying
the contents into a temporary buffer (counting towards memory limit).

Resolves: #105212
Releases: main, 12.4
Change-Id: I3528f31c099b5d1cd3f8ba287a4eb45955ff3510
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86518


Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Reviewed-by: default avatarAndreas Kienast <akienast@scripting-base.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarAndreas Kienast <akienast@scripting-base.de>
parent aa338bdb
Branches
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment