CodeIgniter Forums
Use CI4 session to protect ckfinder file manage - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Use CI4 session to protect ckfinder file manage (/showthread.php?tid=77680)



Use CI4 session to protect ckfinder file manage - seunex - 10-04-2020

Hello please i am trying to use ckfinder with Codeigniter 4. I dont any way i can use the ci_session to portect the ckfinder please
Code:
$config['authentication'] = function () {

session_start();
if($_SESSION['isAdmin'])
{
    return true;
}
else
{
    return false;
}
};
The cofig file is to protect a direct access to the file manage and uses session to protected. I have try to access the codeigniter session outside it app folder but could not find any solution to this.


RE: Use CI4 session to protect ckfinder file manage - InsiteFX - 10-04-2020

CKFinder is JavaScript php is a server language you would some how have to pass the session variable to
say jQuery as Json and use a jQuery get to get the variable.

But trying to do something like what you want is opening all kinds of security risks!


RE: Use CI4 session to protect ckfinder file manage - nc03061981 - 10-04-2020

Check permission before render it