NobuNobu
nobun****@users*****
2006年 1月 27日 (金) 23:34:11 JST
Index: xoops2jp/html/class/smarty/core/core.create_dir_structure.php diff -u xoops2jp/html/class/smarty/core/core.create_dir_structure.php:1.1 xoops2jp/html/class/smarty/core/core.create_dir_structure.php:1.1.8.1 --- xoops2jp/html/class/smarty/core/core.create_dir_structure.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.create_dir_structure.php Fri Jan 27 23:34:10 2006 @@ -22,7 +22,7 @@ /* unix-style paths */ $_dir = $params['dir']; $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY); - $_new_dir = ($_dir{0}=='/') ? '/' : getcwd().'/'; + $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/'; if($_use_open_basedir = !empty($_open_basedir_ini)) { $_open_basedirs = explode(':', $_open_basedir_ini); } Index: xoops2jp/html/class/smarty/core/core.is_secure.php diff -u xoops2jp/html/class/smarty/core/core.is_secure.php:1.1.8.1 xoops2jp/html/class/smarty/core/core.is_secure.php:1.1.8.2 --- xoops2jp/html/class/smarty/core/core.is_secure.php:1.1.8.1 Sun Nov 20 17:05:53 2005 +++ xoops2jp/html/class/smarty/core/core.is_secure.php Fri Jan 27 23:34:10 2006 @@ -27,7 +27,7 @@ foreach ((array)$params['resource_base_path'] as $curr_dir) { if ( ($_cd = realpath($curr_dir)) !== false && strncmp($_rp, $_cd, strlen($_cd)) == 0 && - $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { + substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) { return true; } } @@ -35,10 +35,10 @@ if (!empty($smarty->secure_dir)) { foreach ((array)$smarty->secure_dir as $curr_dir) { if ( ($_cd = realpath($curr_dir)) !== false) { - if( strncmp($_rp, $_cd, strlen($_cd)) == 0 && - $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { + if($_cd == $_rp) { return true; - } elseif ($_cd == $_rp) { + } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 && + substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR) { return true; } } Index: xoops2jp/html/class/smarty/core/core.is_trusted.php diff -u xoops2jp/html/class/smarty/core/core.is_trusted.php:1.1 xoops2jp/html/class/smarty/core/core.is_trusted.php:1.1.8.1 --- xoops2jp/html/class/smarty/core/core.is_trusted.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.is_trusted.php Fri Jan 27 23:34:10 2006 @@ -25,7 +25,7 @@ if (!empty($curr_dir) && is_readable ($curr_dir)) { $_cd = realpath($curr_dir); if (strncmp($_rp, $_cd, strlen($_cd)) == 0 - && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { + && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) { $_smarty_trusted = true; break; } Index: xoops2jp/html/class/smarty/core/core.process_cached_inserts.php diff -u xoops2jp/html/class/smarty/core/core.process_cached_inserts.php:1.1.8.1 xoops2jp/html/class/smarty/core/core.process_cached_inserts.php:1.1.8.2 --- xoops2jp/html/class/smarty/core/core.process_cached_inserts.php:1.1.8.1 Sun Nov 20 17:05:53 2005 +++ xoops2jp/html/class/smarty/core/core.process_cached_inserts.php Fri Jan 27 23:34:10 2006 @@ -52,7 +52,7 @@ $replace = ''; } - $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']); + $params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i])); if ($smarty->debugging) { $_params = array(); require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); Index: xoops2jp/html/class/smarty/core/core.write_compiled_include.php diff -u xoops2jp/html/class/smarty/core/core.write_compiled_include.php:1.1.8.1 xoops2jp/html/class/smarty/core/core.write_compiled_include.php:1.1.8.2 --- xoops2jp/html/class/smarty/core/core.write_compiled_include.php:1.1.8.1 Sun Nov 20 17:05:53 2005 +++ xoops2jp/html/class/smarty/core/core.write_compiled_include.php Fri Jan 27 23:34:10 2006 @@ -15,8 +15,8 @@ function smarty_core_write_compiled_include($params, &$smarty) { - $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}'; - $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}'; + $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; \};'; + $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\'; \};'; preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', $params['compiled_content'], $_match_source, PREG_SET_ORDER);