diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-08-12 11:46:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-12 11:46:47 +0300 |
commit | 0182b9db72d7cc3047309ccc12ea9cd92da2129b (patch) | |
tree | 120e79c56a27c219f33efeb68f03bb2baf578227 /lib | |
parent | bbbe6a06092f5b4df8d69607a183a0352938c966 (diff) |
[stable9] getJailedPath expects $path to have a trailing / (#25703) (#25738)
* getJailedPath expects $path to have a trailing / - fixes #25464
* Adding test case for getPathById including a jailed cache where root is just empty
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/wrapper/cachejail.php | 3 |
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 65275bcb798..83329bbbd9c 100644 --- a/lib/private/files/cache/wrapper/cachejail.php +++ b/lib/private/files/cache/wrapper/cachejail.php @@ -56,6 +56,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 ''; |