Totally Zenned
- Join Date:
- Jul 2012
- Posts:
- 16,908
- Plugin Contributions:
- 2
EasyPopulate 4.0 Support Thread
brittainmark:
I have just got the latest version from git hub and wanted to check if it is now a requirement that the folder in which you keep the uploaded files is under [YOURADMIN] directory.
The reason I ask is that I was having trouble with all the files showing CSV Unknow Delimiter. I tracked the code down to module easypopulate_4.php lines 438-444
$basepath = "";
$realBase = realpath($basepath);
$userpath = $basepath . $file;
$realUserPath = realpath($userpath);
if ($realUserPath === false || strpos($realUserPath, $realBase) !== 0) {
return NULL; // return back to the function with a non-result?
}
>
> The issue is that
> $file /MYSERVER/HOME/EASYPOPULATELOADDIR/EasyPopulateUploadDIR/Myfile.csv
> $realBase /MYSERVER/HOME/EASYPOPULATELOADDIR/MYADMIN
> $userpath /MYSERVER/HOME/EASYPOPULATELOADDIR/EasyPopulateUploadDIR/Myfile.csv
> $realUserPath /MYSERVER/HOME/EASYPOPULATELOADDIR/EasyPopulateUploadDIR/Myfile.csv
>
> does not pass the test unless EasyPopulateUploadDIR is under MYADMIN
> thus $file /MYSERVER/HOME/EASYPOPULATELOADDIR/MYADMIN/EasyPopulateUploadDIR/Myfile.csv
>
> I can leave the folder under MYADMIN just checking that this is now a requirement, OR if i have set something up wrongly.
Was not intended to become a "requirement". I have a fix for the above issue that retains the expected security.
It can be found at this commit: [Restore import from catalog side/remove CSV delimiter warning · mc12345678/EasyPopulate-4.0@84331eb (github.com)](https://github.com/mc12345678/EasyPopulate-4.0/commit/84331ebfabc2a56449363dcc7218475baaed841c)