From f96326d4a9c865d365ad2107f63e471ee305c20b Mon Sep 17 00:00:00 2001 From: mohrt Date: Wed, 3 Aug 2005 12:44:39 +0000 Subject: [PATCH] update changes --- libs/internals/core.is_secure.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libs/internals/core.is_secure.php b/libs/internals/core.is_secure.php index 342f3aff..9bec5c21 100644 --- a/libs/internals/core.is_secure.php +++ b/libs/internals/core.is_secure.php @@ -34,11 +34,14 @@ function smarty_core_is_secure($params, &$smarty) } if (!empty($smarty->secure_dir)) { foreach ((array)$smarty->secure_dir as $curr_dir) { - if ( ($_cd = realpath($curr_dir)) !== false && - strncmp($_rp, $_cd, strlen($_cd)) == 0 && + if ( ($_cd = realpath($curr_dir)) !== false) { + if( strncmp($_rp, $_cd, strlen($_cd)) == 0 && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { - return true; - } + return true; + } elseif ($_cd == $_rp) { + return true; + } + } } } } else {