cvs: smarty / NEWS /libs/internals core.is_secure.php

From: Date: Wed, 17 Aug 2005 15:27:40 +0000
Subject: cvs: smarty / NEWS /libs/internals core.is_secure.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-1790@lists.php.net to get a copy of this message
mohrt Wed Aug 17 11:27:40 2005 EDT Modified files: /smarty NEWS /smarty/libs/internals core.is_secure.php Log: fix notice in debug security check http://cvs.php.net/diff.php/smarty/NEWS?r1=1.512&r2=1.513&ty=u Index: smarty/NEWS diff -u smarty/NEWS:1.512 smarty/NEWS:1.513 --- smarty/NEWS:1.512 Wed Aug 17 10:58:28 2005 +++ smarty/NEWS Wed Aug 17 11:27:40 2005 @@ -1,3 +1,4 @@ + - fix notice in debug security check (Drakla, monte) - return valid reference in get_template_vars() when given var is non-existant (monte) - add escape type "urlpathinfo" to escape modifier (monte) http://cvs.php.net/diff.php/smarty/libs/internals/core.is_secure.php?r1=1.2&r2=1.3&ty=u Index: smarty/libs/internals/core.is_secure.php diff -u smarty/libs/internals/core.is_secure.php:1.2 smarty/libs/internals/core.is_secure.php:1.3 --- smarty/libs/internals/core.is_secure.php:1.2 Wed Aug 3 08:44:39 2005 +++ smarty/libs/internals/core.is_secure.php Wed Aug 17 11:27:40 2005 @@ -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 && + $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR) { return true; } }

« previous php.smarty.cvs (#1790) next »