mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Prevent deleting Webdav root
This commit is contained in:
parent
ddd067a414
commit
6ae5ae2e31
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue