diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-06-05 16:21:55 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-06-05 16:55:09 +0200 |
commit | 6ae5ae2e3167c9fe15a24cdb9657ec5fa1a99188 (patch) | |
tree | 07155203623652118049a18a03fd997cc0514d72 /lib/private/connector | |
parent | ddd067a414502c3271e9a2bcd7f5e0263df995dc (diff) | |
download | nextcloud-server-6ae5ae2e3167c9fe15a24cdb9657ec5fa1a99188.tar.gz nextcloud-server-6ae5ae2e3167c9fe15a24cdb9657ec5fa1a99188.zip |
Prevent deleting Webdav root
Diffstat (limited to 'lib/private/connector')
-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(); } |