Fixed issue with security function check_abs_path() being too strict for Windows - refs #5670

skala
Yannick Warnier 12 years ago
parent 9503e7285b
commit 667b6ca51f
  1. 7
      main/inc/lib/security.lib.php

@ -54,6 +54,13 @@ class Security {
if ($found === 0) {
return true;
} else {
// Code specific to Windows and case-insensitive behaviour
if (api_is_windows_os()) {
$found = stripos($true_path.'/', $checker_path);
if ($found === 0) {
return true;
}
}
// Code specific to courses directory stored on other disk.
$checker_path = str_replace(api_get_path(SYS_COURSE_PATH), $_configuration['symbolic_course_folder_abs'], $checker_path);
$found = strpos($true_path.'/', $checker_path);

Loading…
Cancel
Save