From 0f5923a15030c42156eddf05b161f92024c055ed Mon Sep 17 00:00:00 2001 From: Matthew Dawson Date: Mon, 3 Jan 2011 17:58:49 -0500 Subject: [PATCH] Add similar check to the canWrite function. Signed-off-by: Matthew Dawson --- inc/lib_filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/lib_filesystem.php b/inc/lib_filesystem.php index accc133b7b..170d296bd2 100644 --- a/inc/lib_filesystem.php +++ b/inc/lib_filesystem.php @@ -125,7 +125,7 @@ class OC_FILESYSTEM{ if(substr($path,0,1)!=='/'){ $path='/'.$path; } - if(strstr($path,'/../')){ + if(strstr($path,'/../') || strrchr($path, '/') === '/..' ){ 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