Skip to content
Snippets Groups Projects
Commit 61ce6e21 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Fix a chroot issue where the path /.. (and related paths) are not caught and removed.

parent 290b2d73
No related branches found
No related tags found
No related merge requests found
...@@ -111,7 +111,7 @@ class OC_FILESYSTEM{ ...@@ -111,7 +111,7 @@ class OC_FILESYSTEM{
if(substr($path,0,1)!=='/'){ if(substr($path,0,1)!=='/'){
$path='/'.$path; $path='/'.$path;
} }
if(strstr($path,'/../')){ if(strstr($path,'/../') || strrchr($path, '/') === '/..' ){
return false; return false;
} }
return true;//dummy untill premissions are correctly implemented, also the correcty value because for now users are locked in their seperate data dir and can read/write everything in there return true;//dummy untill premissions are correctly implemented, also the correcty value because for now users are locked in their seperate data dir and can read/write everything in there
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment