aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-08-09 11:04:11 +0200
committerGitHub <noreply@github.com>2016-08-09 11:04:11 +0200
commitb4ed4e152e9853fe85492b10986f9923e703da73 (patch)
tree250c4a54c121bc4d1e3fe25083d0b6cdf179ff87 /lib
parent4277051442c2b6025da936493cb674dcf754d34c (diff)
parentf1cd68d71337d3419ea7fced7304bc2a763d29d4 (diff)
downloadnextcloud-server-b4ed4e152e9853fe85492b10986f9923e703da73.tar.gz
nextcloud-server-b4ed4e152e9853fe85492b10986f9923e703da73.zip
Merge pull request #746 from nextcloud/jail-root
getJailedPath expects $path to have a trailing /
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheJail.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php
index d121ee25361..1196c6b0760 100644
--- a/lib/private/Files/Cache/Wrapper/CacheJail.php
+++ b/lib/private/Files/Cache/Wrapper/CacheJail.php
@@ -59,6 +59,9 @@ class CacheJail extends CacheWrapper {
* @return null|string the jailed path or null if the path is outside the jail
*/
protected function getJailedPath($path) {
+ if ($this->root === '') {
+ return $path;
+ }
$rootLength = strlen($this->root) + 1;
if ($path === $this->root) {
return '';