diff --git a/lib/private/files/objectstore/eosproxy.php b/lib/private/files/objectstore/eosproxy.php index 1ba5afbdbc1b..4c92c3c3f8c8 100644 --- a/lib/private/files/objectstore/eosproxy.php +++ b/lib/private/files/objectstore/eosproxy.php @@ -35,7 +35,7 @@ public static function toEos($ocPath, $storageId) {//ocPath like files/abc.txt o // if the user is a project owner,instead send him to his homedir we send him to the project dir. $project = EosUtil::getProjectNameForUser($username); if($project !== null) { - $project_path= $eos_project_prefix . $project . substr($ocPath,6); + $project_path= $eos_project_prefix . $project . "/" . substr($ocPath,6); #KUBA: added / return $project_path; } diff --git a/lib/private/files/objectstore/eosutil.php b/lib/private/files/objectstore/eosutil.php index 45dca98bc1e5..edcb24d30b38 100644 --- a/lib/private/files/objectstore/eosutil.php +++ b/lib/private/files/objectstore/eosutil.php @@ -1,6 +1,12 @@ true + # "/ d s (#77663455)/jas" => true + # "/aaa (#1)/jas" => false + # "/aaa (#ssss)/jas" => false + # "aaa (#1234)/jas" => false + # "/(#7766)/jas" => false + # "/ (#7766)/jas" => true (this is a flaw) + + + if(startsWith($uri_path,'/')) { + $topdir=explode("/",$uri_path)[1]; + $parts = explode(" ",$topdir); + if(count($parts)<2) { return false; } + $marker=end($parts); + return preg_match("/[(][#](\d{3,})[)]/", $marker); # we match at least 3 digits enclosed within our marker: (#123) + } + else { + return false; + } + } + }