mirror of
https://github.com/Intervention/image.git
synced 2025-08-12 00:43:59 +02:00
security patch in manipulation route
This commit is contained in:
@@ -46,7 +46,8 @@ class ImageServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
// find file
|
// find file
|
||||||
foreach ($config->get('imagecache::paths') as $path) {
|
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)) {
|
if (file_exists($image_path) && is_file($image_path)) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user