Return the proper jailed path when requesting the root path

Signed-off-by: Julius Härtl <jus@bitgrid.net>
pull/16999/head
Julius Härtl 6 years ago
parent 361ff3127e
commit 64fe9bc287
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
  1. 2
      lib/private/Files/Storage/Wrapper/Jail.php

@ -65,7 +65,7 @@ class Jail extends Wrapper {
public function getJailedPath($path) {
$root = rtrim($this->rootPath, '/') . '/';
if (strpos($path, $root) !== 0) {
if ($path !== $this->rootPath && strpos($path, $root) !== 0) {
return null;
} else {
$path = substr($path, strlen($this->rootPath));

Loading…
Cancel
Save