diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-12-21 14:23:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-21 14:23:13 +0100 |
commit | ea8120b1e43b1732618c779c476d42efd05be2cf (patch) | |
tree | f17c939bdd27945dfd4d517e49b8f132182ed0d5 | |
parent | bcea6c3697aacf88b471f7bc54c3005319759b2a (diff) | |
parent | d0956c9a4213d93674355e6fb7d7b0e9e0adfbdf (diff) | |
download | nextcloud-server-ea8120b1e43b1732618c779c476d42efd05be2cf.tar.gz nextcloud-server-ea8120b1e43b1732618c779c476d42efd05be2cf.zip |
Merge pull request #13210 from nextcloud/followup/12883/handle_slash
Followup 12883, gracefully handle the getting of /
-rw-r--r-- | lib/private/Files/AppData/AppData.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Files/AppData/AppData.php b/lib/private/Files/AppData/AppData.php index 3d098ad98ca..7ce29bd0e00 100644 --- a/lib/private/Files/AppData/AppData.php +++ b/lib/private/Files/AppData/AppData.php @@ -132,8 +132,13 @@ class AppData implements IAppData { } } try { - $path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name; - $node = $this->rootFolder->get($path); + // Hardening if somebody wants to retrieve '/' + if ($name === '/') { + $node = $this->getAppDataFolder(); + } else { + $path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name; + $node = $this->rootFolder->get($path); + } } catch (NotFoundException $e) { $this->folders->set($key, $e); throw $e; |