Skip to content

Commit af36f93

Browse files
committed
security: fix CVE-2024-42485 for 1.x
1 parent 771952c commit af36f93

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

routes/web.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?php
22

3+
use Illuminate\Support\Facades\Route;
4+
use Illuminate\Support\Facades\Storage;
5+
36
Route::get('filament-excel/{path}', function (string $path) {
7+
$filename = substr($path, 37);
8+
$path = Storage::disk('filament-excel')->path($path);
9+
410
return
511
response()
6-
->download(Storage::disk('filament-excel')->path($path), substr($path, 37))
12+
->download($path, $filename)
713
->deleteFileAfterSend();
814
})
15+
->middleware(['web', 'signed'])
916
->where('path', '.*')
1017
->name('filament-excel-download');

0 commit comments

Comments
 (0)