Skip to content
Snippets Groups Projects
Commit 06dda427 authored by Vincent Petry's avatar Vincent Petry
Browse files

Validate path in getChild

parent c747a589
No related branches found
No related tags found
No related merge requests found
...@@ -150,9 +150,12 @@ class Directory extends \OC\Connector\Sabre\Node ...@@ -150,9 +150,12 @@ class Directory extends \OC\Connector\Sabre\Node
$path = $this->path . '/' . $name; $path = $this->path . '/' . $name;
if (is_null($info)) { if (is_null($info)) {
try { try {
$this->fileView->verifyPath($this->path, $name);
$info = $this->fileView->getFileInfo($path); $info = $this->fileView->getFileInfo($path);
} catch (\OCP\Files\StorageNotAvailableException $e) { } catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage()); throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
} catch (\OCP\Files\InvalidPathException $ex) {
throw new InvalidPath($ex->getMessage());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment