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:
3
file.php
3
file.php
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user