mirror of
https://github.com/Intervention/image.git
synced 2025-02-06 22:00:38 +01:00
security patch in manipulation route
This commit is contained in:
parent
2fb5e286e4
commit
92a9968876
@ -46,7 +46,8 @@ class ImageServiceProvider extends ServiceProvider
|
||||
|
||||
// find file
|
||||
foreach ($config->get('imagecache::paths') as $path) {
|
||||
$image_path = $path.'/'.$filename;
|
||||
// don't allow '..' in filenames
|
||||
$image_path = $path.'/'.str_replace('..', '', $filename);
|
||||
if (file_exists($image_path) && is_file($image_path)) {
|
||||
break;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user