summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-06-05 19:56:20 +0200
committerLukas Reschke <lukas@owncloud.com>2015-06-05 19:56:20 +0200
commitcbb15f3cbd8812ba1e3c2cfe6bf4285286266fd5 (patch)
treee750fdd5b9a1ca6e25705712e7114a4a09bea726 /lib
parentbd5aebe256e65e5bd1478d95370c380922488b0e (diff)
parentb97be0ea02a62a8ed4c58d254714f280e071d16a (diff)
downloadnextcloud-server-cbb15f3cbd8812ba1e3c2cfe6bf4285286266fd5.tar.gz
nextcloud-server-cbb15f3cbd8812ba1e3c2cfe6bf4285286266fd5.zip
Merge pull request #16767 from owncloud/webdav-preventdeleteroot
Prevent deleting Webdav root
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/directory.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index 6e028ca9daa..85756f112e7 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -230,7 +230,7 @@ class Directory extends \OC\Connector\Sabre\Node
*/
public function delete() {
- if (!$this->info->isDeletable()) {
+ if ($this->path === '' || $this->path === '/' || !$this->info->isDeletable()) {
throw new \Sabre\DAV\Exception\Forbidden();
}