Added check to Configure::getPaths() to account for chroot 'ed hosting. Tested with open_basedir. Closes #5093

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7349 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-07-22 01:12:53 +00:00
parent 0b23ec64ff
commit 2bf7181f05

View file

@ -472,7 +472,9 @@ class Configure extends Object {
$all = array_values($all); $all = array_values($all);
foreach ($all as $path) { foreach ($all as $path) {
$path = rtrim($path, DS); if ($path !== DS) {
$path = rtrim($path, DS);
}
if (empty($path) || $path == '.' || in_array(realpath($path), $used)) { if (empty($path) || $path == '.' || in_array(realpath($path), $used)) {
continue; continue;
} }