Update handling of filePath argument

This commit is contained in:
billz
2023-12-31 08:03:19 +00:00
parent fd38a22c4f
commit ca9c0471b6
2 changed files with 4 additions and 4 deletions

View File

@@ -3,9 +3,10 @@
require '../../includes/csrf.php';
require_once '../../includes/config.php';
$filePath = $_GET['filePath'];
$tempDir = sys_get_temp_dir();
$filePath = $tempDir . DIRECTORY_SEPARATOR . RASPI_DEBUG_LOG;
if (isset($filePath) && strpos($filePath, RASPI_DEBUG_LOG) !== false) {
if (isset($filePath)) {
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($filePath));
header('Expires: 0');