Pluginloader tries to access above the root directory

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Pluginloader tries to access above the root directory

Post by cmb » Fri Apr 13, 2012 5:54 pm

Hello Developers,

I've just noticed, that the pluginloader tries to access a folder above CMSimple's root directory. It's in plugins/index.php line 124:

Code: Select all

if(file_exists('../plugins/pluginloader/languages/'.$sl.'.php')) 
This throws a open_basedir restriction warning, if CMSimple is installed in the web root and open_basedir is set to this folder.

If I'm not mistaken the following 2 lines are an equivalent replacement for line 119-139:

Code: Select all

$pluginloader_cfg['language'] = file_exists($pth['folder']['plugins'].'pluginloader/languages/'.$sl.'.php') ? $sl : 'en';
$pluginloader_cfg['folder_down'] = $pth['folder']['base'] == './' ? '' : '.';
 
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: Pluginloader tries to access above the root directory

Post by svasti » Sat Apr 14, 2012 8:21 am

Hi Christoph,
reminds me of the quite old thread http://www.cmsimpleforum.com/viewtopic.php?f=7&t=783

Good idea to improve and shorten the code... why not put it on the roadmap?? Or better directly into the code of the next release?
svasti

Post Reply