Error changing permissions - Tinymce: Responsive FileManager

0

Apparently, I have ResponsiveFilemanager well integrated with TinyMCE , but when changing the permissions of files and directories, an error is generated, and it does not show the corresponding message that would be something like: You do not have permissions.

Specifically, I have only let the user upload files and create directories, but nothing to move, copy, paste, cut, edit, delete.

Then, for example, when I try to move a file, errors were generated with the file execute.php , ajax_calls.php , and always walk with a variable $_POST[ 'path' ] , as undefined index .

One curious thing I discovered was that by leaving the privilege of rename_files in true , everything worked normally. It seems that there was a conflict with that configuration parameter.

case 'copy_cut':
    if($_POST[sub] != 'copy' && $_POST['sub_action'] != 'cut')
    {
        response(trans('wrong sub-action').AddErrorLocation())->send();
        exit;
    }
    if (strpos($_POST['path'],'../') !==FALSE
        || strpos($_POST['path'],'./') !==FALSE
        || strpos($_POST['path'],'..\') !==FALSE
        || strpos($_POST['path'],'.\') !==FALSE
    {
        response(trans('wrong path'.AddErrorLocation()))->send();
        exit;
    }
    if(trim($_POST['path']) == '')
    {
        response(trans('no path').AddErrorLocation())->send();
    }
    $msg_sub_action = ($_POST['sub_action'] == 'copy' ? trans('Copy') : trans('Cut') );
    $path = $current_path . $_POST['path'];

    if (is_dir($path))
    {
        // can't copy/cut dirs
        if($copy_cut_dirs === false)
        {
            response(sprintf(trans('Copy_Cut_Not_Allowed'), $msg_sub_action, trans('Folders')).AddErrorLocation())->send();
            //...
        }
        //...
    }
    //...
    
asked by Islam Linarez 01.04.2017 в 06:08
source

0 answers