mails2nitesh / kfm

Automatically exported from code.google.com/p/kfm
0 stars 0 forks source link

better $rootdir #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

i change in  

initialise.php on line 147  this: 

$rootdir = (strpos($kfm_userfiles_address, './')===0 || 
strpos($kfm_userfiles_address, '../')===0) ?
KFM_BASE_PATH.str_replace('./','',$kfm_userfiles_address):$kfm_userfiles_ad
dress.'/';

i add "str_replace" ... 

now it is better working with realpath($rootdir)

please check it.

Original issue reported on code.google.com by nilsfeld@gmail.com on 3 Dec 2009 at 7:10

GoogleCodeExporter commented 8 years ago
another problem with this:

in initialise.php at line 147 and ...

$rootdir = (strpos($kfm_userfiles_address, './')===0 || 
strpos($kfm_userfiles_address, '../')===0) ?
KFM_BASE_PATH.str_replace('./','',$kfm_userfiles_address):$kfm_userfiles_address
.'/';

$rootdir = realpath($rootdir);

if (!is_dir($rootdir))mkdir($rootdir, 0755);
if (!is_dir($rootdir)) {

realpath returns false if path is not correct.
after false the $rootdir cannot create because rootdir is false.

Original comment by nilsfeld@gmail.com on 4 Dec 2009 at 9:40

GoogleCodeExporter commented 8 years ago
look issue 33  initialise.php  on line 153-168

Original comment by nilsfeld@gmail.com on 21 Dec 2009 at 12:51

GoogleCodeExporter commented 8 years ago
this will not work if the $kfm_userfiles_address is "../test/"

Original comment by kae.verens@gmail.com on 27 Dec 2009 at 5:55

GoogleCodeExporter commented 8 years ago
fixed with http://code.google.com/p/kfm/source/detail?r=952

Original comment by nilsfeld@gmail.com on 28 Dec 2009 at 12:39