Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: CONTENIDO 4.9.2
-
Fix Version/s: CONTENIDO 4.9.3
-
Component/s: Content Management
-
Labels:
Description
The logic to read all files
cModuleHandler.getAllFilesFromDirectory()
within a module directory may cause a PHP warning, if PHP is configured with a restrictive open_basedir setting.
The related entry in the errolog.txt is like:
[...] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(.../cms/data/modules/form_login/template/login.tpl/) is not within the allowed path(s): (/path/to/contenido/:/another/path) in .../contenido/classes/module/class.module.handler.php on line 556
We should not do a check like
is_dir($dir . $file . '/')
since this concatenates a wrong path string in case of an file...
It is better to use DirectoryIterator with DirectoryIterator.isFile() or DirectoryIterator.isDir()
Attachments
Issue Links
- is cloned by
-
FFBCON-437 Loading...