[svn r11150] Fixed buggy strpos() call (using strlen rather than offset)

skala
Yannick Warnier 19 years ago
parent 6133fb050a
commit bddbfd2fa1
  1. 4
      main/inc/lib/security.lib.php

@ -68,7 +68,7 @@ class Security{
}
$abs_path = $current_path.$rel_path;
$true_path = realpath($abs_path);
$found = strpos($true_path.'/',$checker_path,strlen($checker_path));
$found = strpos($true_path.'/',$checker_path);
if($found===0)
{
return true;
@ -85,7 +85,7 @@ class Security{
{
if(empty($checker_path)){return false;} //checker path must be set
$true_path = realpath($abs_path);
$found = strpos($true_path.'/',$checker_path,strlen($checker_path));
$found = strpos($true_path.'/',$checker_path);
if($found===0)
{
return true;

Loading…
Cancel
Save