From 7f6ff2f41f07129292e92eb52ba4ab4b3af6ff45 Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 23 Oct 2003 07:50:55 +0000 Subject: [PATCH] fix handling of trailing-slashes in open_basedir in smarty_core_create_dir_structure() --- NEWS | 3 +++ libs/core/core.create_dir_structure.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index af7688f9..914112e0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ + - fix handling of trailing-slashes in open_basedir in + smarty_core_create_dir_structure() (packman, messju) + Version 2.6.0-RC2 (Oct 8, 2003) ------------------------------- diff --git a/libs/core/core.create_dir_structure.php b/libs/core/core.create_dir_structure.php index 7642e212..999cf593 100644 --- a/libs/core/core.create_dir_structure.php +++ b/libs/core/core.create_dir_structure.php @@ -56,7 +56,7 @@ function smarty_core_create_dir_structure($params, &$smarty) // do not attempt to test or make directories outside of open_basedir $_make_new_dir = false; foreach ($_open_basedirs as $_open_basedir) { - if (substr($_new_dir . '/', 0, strlen($_open_basedir)) == $_open_basedir) { + if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) { $_make_new_dir = true; break; }