From 6ae5ae2e3167c9fe15a24cdb9657ec5fa1a99188 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 5 Jun 2015 16:21:55 +0200 Subject: Prevent deleting Webdav root --- lib/private/connector/sabre/directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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(); } -- cgit v1.2.3