diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-06-05 19:56:20 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-06-05 19:56:20 +0200 |
commit | cbb15f3cbd8812ba1e3c2cfe6bf4285286266fd5 (patch) | |
tree | e750fdd5b9a1ca6e25705712e7114a4a09bea726 /lib | |
parent | bd5aebe256e65e5bd1478d95370c380922488b0e (diff) | |
parent | b97be0ea02a62a8ed4c58d254714f280e071d16a (diff) | |
download | nextcloud-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.php | 2 |
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(); } |