[svn r11179] Fix a bug with servers on windows (path bug)

skala
Julian Prud'homme 18 years ago
parent 97050b71fb
commit 8b6ede90d4
  1. 6
      main/inc/lib/security.lib.php

@ -67,7 +67,7 @@ class Security{
$rel_path = '/'.$rel_path;
}
$abs_path = $current_path.$rel_path;
$true_path = realpath($abs_path);
$true_path=str_replace("\\", "/", realpath($abs_path));
$found = strpos($true_path.'/',$checker_path);
if($found===0)
{
@ -84,7 +84,9 @@ class Security{
function check_abs_path($abs_path,$checker_path)
{
if(empty($checker_path)){return false;} //checker path must be set
$true_path = realpath($abs_path);
$true_path=str_replace("\\", "/", realpath($abs_path));
$found = strpos($true_path.'/',$checker_path);
if($found===0)
{

Loading…
Cancel
Save