security: File Exception Handling

This addresses a report submitted by Khaled M. Alshammri (@ik0z) in regards
to file error handling and diagnostic output.
This commit is contained in:
JediKev
2026-06-17 20:35:27 +00:00
parent 98abb059b1
commit e52e01005b

View File

@@ -67,7 +67,8 @@ if ($file->verifySignature($_GET['signature'], $_GET['expires'])) {
$file->download($filename, $disposition, @$_GET['expires']);
}
catch (Exception $ex) {
Http::response(500, 'Unable to find that file: '.$ex->getMessage());
$ost->logError(__('File download error'), $ex->getMessage());
Http::response(500, __('Unable to retrieve the requested file'));
}
}
// else