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

[email protected] ("Monte Ohrt")
Newsgroups php.smarty.cvs
Message-ID <cvsmohrt1123073082@cvsserver>
mohrt		Wed Aug  3 08:44:42 2005 EDT

  Modified files:              
    /smarty/libs/internals	core.is_secure.php 
  Log:
  update changes
  
  
http://cvs.php.net/diff.php/smarty/libs/internals/core.is_secure.php?r1=1.1&r2=1.2&ty=u
Index: smarty/libs/internals/core.is_secure.php
diff -u smarty/libs/internals/core.is_secure.php:1.1 smarty/libs/internals/core.is_secure.php:1.2
--- smarty/libs/internals/core.is_secure.php:1.1	Thu Sep 16 19:07:32 2004
+++ smarty/libs/internals/core.is_secure.php	Wed Aug  3 08:44:39 2005
@@ -34,11 +34,14 @@
         }
         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 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.