cvs: smarty / NEWS /libs/internals core.is_secure.php
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1124292460@cvsserver> |
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;
}
}
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php