diff options
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/view.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index f92441492f7..95b688fef5c 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -153,7 +153,10 @@ class View { return '/'; } - if (strpos($path, $this->fakeRoot) !== 0) { + // missing slashes can cause wrong matches! + $root = rtrim($this->fakeRoot, '/') . '/'; + + if (strpos($path, $root) !== 0) { return null; } else { $path = substr($path, strlen($this->fakeRoot)); |