From: Arthur Schiwon Date: Wed, 6 Mar 2013 14:21:12 +0000 (+0100) Subject: return 403 when mkdir failed on webDAV, fixes #2127 X-Git-Tag: v5.0.0RC3~10^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6acbadf41833c8d5a78aabb06c6c7e0f4f4c019b;p=nextcloud-server.git return 403 when mkdir failed on webDAV, fixes #2127 --- diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index 953692f80a9..6ccb54b79ab 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -107,7 +107,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa public function createDirectory($name) { $newPath = $this->path . '/' . $name; - \OC\Files\Filesystem::mkdir($newPath); + if(!\OC\Files\Filesystem::mkdir($newPath)) { + throw new Sabre_DAV_Exception_Forbidden('Could not create directory '.$newPath); + } }