Skip to content

Commit

Permalink
security: fix CVE-2024-42485 for 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
pxlrbt committed Sep 13, 2024
1 parent 771952c commit af36f93
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Storage;

Route::get('filament-excel/{path}', function (string $path) {
$filename = substr($path, 37);
$path = Storage::disk('filament-excel')->path($path);

return
response()
->download(Storage::disk('filament-excel')->path($path), substr($path, 37))
->download($path, $filename)
->deleteFileAfterSend();
})
->middleware(['web', 'signed'])
->where('path', '.*')
->name('filament-excel-download');

0 comments on commit af36f93

Please # to comment.