CodeIgniter Forums
Ckeditor and Ckfinder with file manager - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Ckeditor and Ckfinder with file manager (/showthread.php?tid=76951)



Ckeditor and Ckfinder with file manager - Rainwod - 07-06-2020

hello to the whole community, I need help with the integration of ckfinder and CI 3.X, I have been shipwrecked on the internet between old posts and some more current ones even within the forums of this community and I still have not been able to find advice to make the ckfinder file manager, I have already managed to do the CRUD with the editor and I can even upload images and display them in the editor and in the controller view, but I can't get the filemanager to work, it always keeps loading and showing the message "please wait. "
In console it marks error 400. Someone has an idea
Thank you very much in advance Huh Confused Exclamation


RE: Ckeditor and Ckfinder with file manager - InsiteFX - 07-07-2020

How to Fix a 400 Bad Request (Causes and Fixes)


RE: Ckeditor and Ckfinder with file manager - ivantcholakov - 07-07-2020

I don't use CKFinder, but something other. I can tell that the first thing to be ensured is that CodeIgniter and CKFinder share the same session, especially when we talk about administrative part of the site. Did you pay attention about that? And then the authentication option of CKFinder would be possible to be implemented.

https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_authentication


RE: Ckeditor and Ckfinder with file manager - Rainwod - 07-08-2020

thanks i see the error, now i cant access to the session data


RE: Ckeditor and Ckfinder with file manager - jreklund - 07-08-2020

Haven't personally used it so can't be of any help. But please provide some code, as it's easier to help you.

I'm using this one; https://github.com/Studio-42/elFinder


RE: Ckeditor and Ckfinder with file manager - Rainwod - 07-09-2020

Hi, thanks to all the users for responding. As I said previously I have successfully integrated ckeditor and ckfinder, the problem is that I cannot deny access so that only the logged in users (Administration Panel) can run the file manager.I have already read the documentation for the configuration and it tells me that I have to control it with a function that returns true or false in this parameter of ckfinder:
PHP Code:
$config['authentication'
Right now that parameter is configured as:
PHP Code:
$config['authentication'] = function () {
        return true;
}; 
clearly it is a vulnerability because anyone who gets the filemanager path can edit files and add folders.I have tried in several ways to read the information of the $ _SESSION array but I have not obtained no results. Again thank you very much for your time and patience


RE: Ckeditor and Ckfinder with file manager - InsiteFX - 07-09-2020

You can use the servers chmod to set the folder permissions so that only the owner you can use it.

Linux chmod command


RE: Ckeditor and Ckfinder with file manager - Rainwod - 07-09-2020

the problem is not about file permissions


RE: Ckeditor and Ckfinder with file manager - jreklund - 07-10-2020

How do you check in CodeIgniter that people are signed in? Are you using $_SESSION at all?

Generally speaking, the most simple one can be:
$config['authentication'] = (bool) $_SESSION['login']['logged_in'];

Depending on how of a tight security you are using at the moment.


RE: Ckeditor and Ckfinder with file manager - KokoZ - 10-13-2020

(07-06-2020, 09:31 PM)Rainwod Wrote: hello to the whole community, I need help with the integration of ckfinder and CI 3.X, I have been shipwrecked on the internet between old posts and some more current ones even within the forums of this community and I still have not been able to find advice to make the ckfinder file manager, I have already managed to do the CRUD with the editor and I can even upload images and display them in the editor and in the controller view, but I can't get the filemanager to work, it always keeps loading and showing the message "please wait. "
In console it marks error 400. Someone has an idea
Thank you very much in advance Huh Confused Exclamation

A 400 Bad Request error means that the request the client made is incorrect or corrupt, and the server can't understand it. 

The main thing to understand is that the 400 error is a client-side error. It indicates that the request the client submitted can't be processed by the server.