From da0f7c58654b6ae370aa903c21be56adde62abdf Mon Sep 17 00:00:00 2001 From: Matthew Hilton Date: Thu, 27 Feb 2025 08:28:01 +1000 Subject: [PATCH] [#368] Ensure output buffer is empty before serving files --- file.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/file.php b/file.php index e41884d..e068e86 100644 --- a/file.php +++ b/file.php @@ -69,6 +69,11 @@ function auth_outage_bootstrap_callback() { http_response_code(404); die('File not found.'); } + + // Ensure there is nothing in the output buffer. + // otherwise the file will not be read correctly. + ob_clean(); + readfile($file); exit(0); }