diff options
author | blizzz <blizzz@owncloud.com> | 2013-03-06 06:57:45 -0800 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2013-03-06 06:57:45 -0800 |
commit | e5a497c9248fcab82b84befbc3842affccc71f9d (patch) | |
tree | 5c9ff03f8aa5384b2d6e46831fd4d32bc0bd03c2 | |
parent | a2aebbd742a56c2b63e0986bb5530223f40a52e3 (diff) | |
parent | 6acbadf41833c8d5a78aabb06c6c7e0f4f4c019b (diff) | |
download | nextcloud-server-e5a497c9248fcab82b84befbc3842affccc71f9d.tar.gz nextcloud-server-e5a497c9248fcab82b84befbc3842affccc71f9d.zip |
Merge pull request #2134 from owncloud/fix_2127
return 403 when mkdir failed on webDAV, fixes #2127
-rw-r--r-- | lib/connector/sabre/directory.php | 4 |
1 files changed, 3 insertions, 1 deletions
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); + } } |