<commit_before><?php namespace Jayked\Laravelfilemanager\controllers;

use Jayked\Laravelfilemanager\controllers\Controller;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Intervention\Image\Facades\Image;

/**
 * Class ResizeController
 * @package Jayked\Laravelfilemanager\controllers
 */
class ResizeController extends LfmController {
	public $option = 'resize';

    /**
     * Dipsplay image for resizing
     *
     * @return mixed
     */
    public function getResize()
    {
        $ratio = 1.0;
        $image = Input::get('img');

        $path_to_image   = parent::getPath('directory') . $image;
        $original_width  = Image::make($path_to_image)->width();
        $original_height = Image::make($path_to_image)->height();

        $scaled = false;<commit_msg>[IMAGE] Validate file access upon resizing an image<commit_after><?php namespace Jayked\Laravelfilemanager\controllers;

use Jayked\Laravelfilemanager\controllers\Controller;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Intervention\Image\Facades\Image;

/**
 * Class ResizeController
 * @package Jayked\Laravelfilemanager\controllers
 */
class ResizeController extends LfmController {
	public $option = 'resize';

    /**
     * Dipsplay image for resizing
     *
     * @return mixed
     */
    public function getResize()
    {
        $ratio = 1.0;
        $image = Input::get('img');

        $path_to_image   = parent::getPath('directory') . $image;
        $this->validateLocation($path_to_image);
        $original_width  = Image::make($path_to_image)->width();
        $original_height = Image::make($path_to_image)->height();

        $scaled = false;
{'fraction_non_alphanumeric': 0.1250701065619742, 'fraction_numerical': 0.002243409983174425, 'mean_word_length': 3.6458333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2254554', 'n_tokens_mistral': 543, 'n_tokens_neox': 543, 'n_words': 99}