diff options
Diffstat (limited to 'lib/private/connector/sabre/file.php')
-rw-r--r-- | lib/private/connector/sabre/file.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index 7ef6eea768e..8f0642d794a 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -66,17 +66,15 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile { throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled"); } - $fileName = basename($this->info->getPath()); - if (!\OCP\Util::isValidFileName($fileName)) { - throw new \Sabre\DAV\Exception\BadRequest(); - } + // verify path of the target + $this->verifyPath(); // chunked handling if (isset($_SERVER['HTTP_OC_CHUNKED'])) { return $this->createFileChunked($data); } - list($storage,) = $this->fileView->resolvePath($this->path); + list($storage) = $this->fileView->resolvePath($this->path); $needsPartFile = $this->needsPartFile($storage) && (strlen($this->path) > 1); if ($needsPartFile) { @@ -329,5 +327,5 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile { // and/or add method on Storage called "needsPartFile()" return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') && !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud'); - } + } } |