I am using responsive FileManager 9.14.0 with TinyMCE 5.0.16 and Laravel 6 running on Nginx 1.16.1
I have the following folder structure:
| public
| |- uploads
| |- thumbs
| |- filemanager
| |- js
| | |- tinymce
| | | |- plugins
| | | | |- responsivefilemanager
| | | | | |- plugin.min.js
I use laravel authentication to protect a 'create' page where the user can add text using tinyMCE and upload images using RFM as tyniMCE plugin.
But RFM is accessible directly if with the following URL
http://www.myhost.test/filemanager/dialog.php
How can I prevent this behavior. I want RFM to be accessible only from the tinyMCE editor.
im not familier with laravel but ...
in Responsive File Manager 9.0 there is a folder called config that contain config.php
define('USE_ACCESS_KEYS', false); // TRUE or FALSE -------- to ------> define('USE_ACCESS_KEYS', true); // TRUE or FALSEthis force Responsive File Manager to use Aaccess Key to prevent all attempt from being accessed to your files and folders.
in same file at line 190 add your users auth_key for whom they need to use file-manager . for example :
username: jim auth_key: a1s2d3f4g5h6j7k8l9mmusername: lisa auth_key: zqxwd3f4vrbth6j7btnyso line 190 should rewrite like line below:
go to your form and add a button/link to access RESPONSIVE FILE MANAGER
<a href="https://www.example.com/admin/responsive-filemanager/filemanager/dialog.php?akey=<?php echo {{{your authenticated user AUTH_KEY}}}; ?> </a>if there is no {{{your authenticated user AUTH_KEY}}} there is 2 way: 1)) add a column auth_key to your users table and generate auth_key that should be equal for users they want to access to responsive file manager in both database and config.php file. 2)) use username instead of auth_key so your config at line 19 will be: 'access_keys' => array( "jim" , "lisa"),
and now your responsive file manager access link will be like this:
<a href="https://www.example.com/admin/responsive-filemanager/filemanager/dialog.php?akey=jim ></a>jim is static here u should make it dynamic by call function to return authenticated user USERNAME and put it after &akey= in link
now if akey value in link find in access_key array the responsive file manager page will be work otherwise it show you ACCESS DENIED!!!