fix validation of getfile parameter - i hate this bloody merge conflicts
This commit is contained in:
parent
8534373f2f
commit
d032345191
|
@ -443,8 +443,8 @@ class OC{
|
|||
$_GET['getfile'] = $file;
|
||||
}
|
||||
if(!is_null(self::$REQUESTEDFILE)){
|
||||
$subdir = OC::$APPSROOT . '/' . self::$REQUESTEDAPP . '/' . self::$REQUESTEDFILE;
|
||||
$parent = OC::$APPSROOT . '/' . self::$REQUESTEDAPP;
|
||||
$subdir = OC::$APPSROOT . '/apps/' . self::$REQUESTEDAPP . '/' . self::$REQUESTEDFILE;
|
||||
$parent = OC::$APPSROOT . '/apps/' . self::$REQUESTEDAPP;
|
||||
if(!OC_Helper::issubdirectory($subdir, $parent)){
|
||||
self::$REQUESTEDFILE = null;
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
|
|
|
@ -576,14 +576,12 @@ class OC_Helper {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
echo 'SUB: ' . $sub . "\n";
|
||||
/*echo 'SUB: ' . $sub . "\n";
|
||||
echo 'PAR: ' . $parent . "\n";
|
||||
echo 'REALSUB: ' . $realpath_sub . "\n";
|
||||
echo 'REALPAR: ' . $realpath_parent . "\n";
|
||||
echo substr($realpath_sub, 0, strlen($realpath_parent));
|
||||
exit;
|
||||
*/
|
||||
exit;*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue