]> git.ipfire.org Git - ipfire-2.x.git/commit
backup.cgi: Read and deliver the requested backup in pieces
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 10 May 2023 09:52:03 +0000 (11:52 +0200)
committerPeter Müller <peter.mueller@ipfire.org>
Thu, 11 May 2023 20:07:13 +0000 (20:07 +0000)
commitc797789c1f45dc76f4cf933ad3e3d24376c2b76e
tree92114d088900f411cd641639f03b10d47e47bfa3
parent4e28814b6f9378ec1dad7bf62243bf4ccf214397
backup.cgi: Read and deliver the requested backup in pieces

Read-in the requested backup file line by line and directly deliver this
as stream to the client.

This fixes the problem with very big backups on systems with very
limited RAM, which resulted in an OOM kill of the CGI and delivery
process.

Fixes #13096.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/backup.cgi