summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-06-05 12:08:18 +0200
committerVincent Petry <pvince81@owncloud.com>2015-06-05 12:08:18 +0200
commit06dda427f38f240539f4d3054da7a5eb80aaaf8b (patch)
tree4ce05103853536f449690eac6ff5a1687df40e75 /lib
parentc747a58978ffd1985c547f94cedec29663d73496 (diff)
downloadnextcloud-server-06dda427f38f240539f4d3054da7a5eb80aaaf8b.tar.gz
nextcloud-server-06dda427f38f240539f4d3054da7a5eb80aaaf8b.zip
Validate path in getChild
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/directory.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index 58f16a2bd04..7349db3d6e0 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -150,9 +150,12 @@ class Directory extends \OC\Connector\Sabre\Node
$path = $this->path . '/' . $name;
if (is_null($info)) {
try {
+ $this->fileView->verifyPath($this->path, $name);
$info = $this->fileView->getFileInfo($path);
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
+ } catch (\OCP\Files\InvalidPathException $ex) {
+ throw new InvalidPath($ex->getMessage());
}
}